@Test public void shouldUpdateVirtualFacilitiesInPostProcess() throws Exception { Date modifiedDate = new Date(); AuditFields auditFields = new AuditFields(modifiedDate); Facility facility = mock(Facility.class); List<Facility> facilities = asList(facility); when(facilityService.getAllByRequisitionGroupMemberModifiedDate(modifiedDate)).thenReturn(facilities); requisitionGroupMemberHandler.postProcess(auditFields); verify(requisitionGroupMemberService).updateMembersForVirtualFacilities(facility); }
@Override public void postProcess(AuditFields auditFields) { List<Facility> facilities = facilityService.getAllByRequisitionGroupMemberModifiedDate(auditFields.getCurrentTimestamp()); for (Facility facility : facilities) { requisitionGroupMemberService.updateMembersForVirtualFacilities(facility); } }
RequisitionGroupMemberHandler extends AbstractModelPersistenceHandler { @Override public void postProcess(AuditFields auditFields) { List<Facility> facilities = facilityService.getAllByRequisitionGroupMemberModifiedDate(auditFields.getCurrentTimestamp()); for (Facility facility : facilities) { requisitionGroupMemberService.updateMembersForVirtualFacilities(facility); } } }
RequisitionGroupMemberHandler extends AbstractModelPersistenceHandler { @Override public void postProcess(AuditFields auditFields) { List<Facility> facilities = facilityService.getAllByRequisitionGroupMemberModifiedDate(auditFields.getCurrentTimestamp()); for (Facility facility : facilities) { requisitionGroupMemberService.updateMembersForVirtualFacilities(facility); } }  }
RequisitionGroupMemberHandler extends AbstractModelPersistenceHandler { @Override public void postProcess(AuditFields auditFields) { List<Facility> facilities = facilityService.getAllByRequisitionGroupMemberModifiedDate(auditFields.getCurrentTimestamp()); for (Facility facility : facilities) { requisitionGroupMemberService.updateMembersForVirtualFacilities(facility); } }  @Override void postProcess(AuditFields auditFields); @Override String getMessageKey(); }
RequisitionGroupMemberHandler extends AbstractModelPersistenceHandler { @Override public void postProcess(AuditFields auditFields) { List<Facility> facilities = facilityService.getAllByRequisitionGroupMemberModifiedDate(auditFields.getCurrentTimestamp()); for (Facility facility : facilities) { requisitionGroupMemberService.updateMembersForVirtualFacilities(facility); } }  @Override void postProcess(AuditFields auditFields); @Override String getMessageKey();  }