ClusterDiskSpaceManager { public void setDiskSpace(String server, DiskSpace space) throws DiskSpaceCheckerException { if (!servers.contains(server)) { throw new DiskSpaceCheckerException("Unrecognised server " + server); } diskSpaceMap.put(server, space); } ClusterDiskSpaceManager(Set<String> servers); void setDiskSpace(String server, DiskSpace space); Map<String, DiskSpace> getDiskSpace(); Set<String> getServers();  }
@Test(expected = uk.co.flax.harahachibu.services.DiskSpaceCheckerException.class) public void throwsExceptionWhenServerNotKnown() throws Exception { manager.setDiskSpace("blah", new DiskSpace(0, 0)); }