@Test public void testRemoveTransplantProgramFor() { assertEquals(0, hospital.getTransplantPrograms().size()); assertTrue(hospital.addTransplantProgramFor(organ)); assertEquals(1, hospital.getTransplantPrograms().size()); assertTrue(hospital.removeTransplantProgramFor(organ)); assertEquals(0, hospital.getTransplantPrograms().size()); }
public boolean removeTransplantProgramFor(Organ organ) { return transplantPrograms.remove(organ); }
Hospital { public boolean removeTransplantProgramFor(Organ organ) { return transplantPrograms.remove(organ); } }
Hospital { public boolean removeTransplantProgramFor(Organ organ) { return transplantPrograms.remove(organ); } protected  Hospital();  Hospital(String name, double latitude, double longitude, String address);  Hospital(String name, double latitude, double longitude, String address, Set<Organ> transplantPrograms); }
Hospital { public boolean removeTransplantProgramFor(Organ organ) { return transplantPrograms.remove(organ); } protected  Hospital();  Hospital(String name, double latitude, double longitude, String address);  Hospital(String name, double latitude, double longitude, String address, Set<Organ> transplantPrograms); static Set<Hospital> getDefaultHospitals(); static Hospital getNearestHospitalToRegion(Region region, Iterable<Hospital> hospitals); static Hospital getHospitalForClient(Client client, Iterable<Hospital> hospitals); @Override String toString(); Long getId(); void setId(Long id); String getName(); double getLatitude(); double getLongitude(); String getAddress(); void setConfig(Config config); Set<Organ> getTransplantPrograms(); void setTransplantPrograms(Set<Organ> transplantPrograms); boolean transplantProgramsIsNull(); boolean addTransplantProgramFor(Organ organ); boolean removeTransplantProgramFor(Organ organ); boolean hasTransplantProgram(Organ organ); double calculateDistanceTo(Hospital hospital); double calculateDistanceTo(Region region); Duration calculateTimeTo(Hospital otherHospital, double speedInKMH); Duration calculateTimeTo(Hospital otherHospital); Hospital getNearestWithTransplantProgram(Organ organ, Iterable<Hospital> hospitals); @Override boolean equals(Object obj); @Override int hashCode(); }
Hospital { public boolean removeTransplantProgramFor(Organ organ) { return transplantPrograms.remove(organ); } protected  Hospital();  Hospital(String name, double latitude, double longitude, String address);  Hospital(String name, double latitude, double longitude, String address, Set<Organ> transplantPrograms); static Set<Hospital> getDefaultHospitals(); static Hospital getNearestHospitalToRegion(Region region, Iterable<Hospital> hospitals); static Hospital getHospitalForClient(Client client, Iterable<Hospital> hospitals); @Override String toString(); Long getId(); void setId(Long id); String getName(); double getLatitude(); double getLongitude(); String getAddress(); void setConfig(Config config); Set<Organ> getTransplantPrograms(); void setTransplantPrograms(Set<Organ> transplantPrograms); boolean transplantProgramsIsNull(); boolean addTransplantProgramFor(Organ organ); boolean removeTransplantProgramFor(Organ organ); boolean hasTransplantProgram(Organ organ); double calculateDistanceTo(Hospital hospital); double calculateDistanceTo(Region region); Duration calculateTimeTo(Hospital otherHospital, double speedInKMH); Duration calculateTimeTo(Hospital otherHospital); Hospital getNearestWithTransplantProgram(Organ organ, Iterable<Hospital> hospitals); @Override boolean equals(Object obj); @Override int hashCode();  }