@Test public void shouldPublishProgramSupportedFeedForAllFacilitiesUploaded() throws Exception { Date currentTimestamp = new Date(); AuditFields auditFields = new AuditFields(currentTimestamp); Facility facility = new Facility(); List<Facility> facilities = asList(facility); when(facilityService.getAllByProgramSupportedModifiedDate(currentTimestamp)).thenReturn(facilities); programSupportedPersistenceHandler.postProcess(auditFields); verify(facilityService).getAllByProgramSupportedModifiedDate(currentTimestamp); verify(service).updateForVirtualFacilities(facility); verify(service).notifyProgramSupportedUpdated(facility); }
@Override public void postProcess(AuditFields auditFields) { List<Facility> facilities = facilityService.getAllByProgramSupportedModifiedDate(auditFields.getCurrentTimestamp()); for (Facility facility : facilities) { service.updateForVirtualFacilities(facility); service.notifyProgramSupportedUpdated(facility); } }
ProgramSupportedPersistenceHandler extends AbstractModelPersistenceHandler { @Override public void postProcess(AuditFields auditFields) { List<Facility> facilities = facilityService.getAllByProgramSupportedModifiedDate(auditFields.getCurrentTimestamp()); for (Facility facility : facilities) { service.updateForVirtualFacilities(facility); service.notifyProgramSupportedUpdated(facility); } } }
ProgramSupportedPersistenceHandler extends AbstractModelPersistenceHandler { @Override public void postProcess(AuditFields auditFields) { List<Facility> facilities = facilityService.getAllByProgramSupportedModifiedDate(auditFields.getCurrentTimestamp()); for (Facility facility : facilities) { service.updateForVirtualFacilities(facility); service.notifyProgramSupportedUpdated(facility); } }  }
ProgramSupportedPersistenceHandler extends AbstractModelPersistenceHandler { @Override public void postProcess(AuditFields auditFields) { List<Facility> facilities = facilityService.getAllByProgramSupportedModifiedDate(auditFields.getCurrentTimestamp()); for (Facility facility : facilities) { service.updateForVirtualFacilities(facility); service.notifyProgramSupportedUpdated(facility); } }  @Override void postProcess(AuditFields auditFields); @Override String getMessageKey(); }
ProgramSupportedPersistenceHandler extends AbstractModelPersistenceHandler { @Override public void postProcess(AuditFields auditFields) { List<Facility> facilities = facilityService.getAllByProgramSupportedModifiedDate(auditFields.getCurrentTimestamp()); for (Facility facility : facilities) { service.updateForVirtualFacilities(facility); service.notifyProgramSupportedUpdated(facility); } }  @Override void postProcess(AuditFields auditFields); @Override String getMessageKey();  }