@Test public void shouldSaveDeliveryZoneMember() throws Exception { service.save(member); verify(repository).insert(member); }
public void save(DeliveryZoneMember member) { fillFacility(member); fillDeliveryZone(member); if (member.getId() == null) { validateIfFacilityAlreadyAssignedToDeliveryZoneForProgram(member); repository.insert(member); } else repository.update(member); }
DeliveryZoneMemberService { public void save(DeliveryZoneMember member) { fillFacility(member); fillDeliveryZone(member); if (member.getId() == null) { validateIfFacilityAlreadyAssignedToDeliveryZoneForProgram(member); repository.insert(member); } else repository.update(member); } }
DeliveryZoneMemberService { public void save(DeliveryZoneMember member) { fillFacility(member); fillDeliveryZone(member); if (member.getId() == null) { validateIfFacilityAlreadyAssignedToDeliveryZoneForProgram(member); repository.insert(member); } else repository.update(member); }  }
DeliveryZoneMemberService { public void save(DeliveryZoneMember member) { fillFacility(member); fillDeliveryZone(member); if (member.getId() == null) { validateIfFacilityAlreadyAssignedToDeliveryZoneForProgram(member); repository.insert(member); } else repository.update(member); }  void save(DeliveryZoneMember member); DeliveryZoneMember getByDeliveryZoneCodeAndFacilityCode(String deliveryZoneCode, String facilityCode); }
DeliveryZoneMemberService { public void save(DeliveryZoneMember member) { fillFacility(member); fillDeliveryZone(member); if (member.getId() == null) { validateIfFacilityAlreadyAssignedToDeliveryZoneForProgram(member); repository.insert(member); } else repository.update(member); }  void save(DeliveryZoneMember member); DeliveryZoneMember getByDeliveryZoneCodeAndFacilityCode(String deliveryZoneCode, String facilityCode);  }