### Question:
LocationDataManager { void start(final EventExecutorService service) { getTimer().schedule(new InitializeTask(service, this, getTimer()), LocationDataManager.PADDING_TIME); }  void setLocationDataService(final LocationDataService locationDataService); LocationDataService getLocationDataService(); LocationInfo getLocationInfo(final String locationName); LocationDetails getLocationDetails(final String locationName); ApplicationInfo getApplicationInfo(final String applicationName); ApplicationDetails getApplicationDetails(final String applicationName); void setActiveApplications(final Set<String> activeApplications); Timer getTimer(); void setTimer(Timer timer); Set<String> getActiveApplications(); static final int PADDING_TIME; }### Answer:
@Test public void testHandleAllMonitoringLocationDefinitions() { LocationDefHandler handler = m_easyMockUtils.createMock(LocationDefHandler.class); handler.start(2880); handler.handle(isA(OnmsMonitoringLocationDefinition.class)); expectLastCall().times(2880); handler.finish(); m_easyMockUtils.replayAll(); m_locationDataService.handleAllMonitoringLocationDefinitions(Collections.singleton(handler)); m_easyMockUtils.verifyAll(); }
@Test public void testStart() { EventExecutorService service = m_easyMockUtils.createMock(EventExecutorService.class); service.addEventUserSpecific(hasStatus(Status.DOWN)); expectLastCall().times(12); service.addEventUserSpecific(hasStatus(Status.UP)); expectLastCall().times(357); service.addEventUserSpecific(hasStatus(Status.DISCONNECTED)); expectLastCall().times(3); service.addEventUserSpecific(hasStatus(Status.STOPPED)); expectLastCall().times(4); service.addEventUserSpecific(hasStatus(Status.UNKNOWN)); expectLastCall().times(2880-376); service.addEventUserSpecific(isA(ApplicationUpdatedRemoteEvent.class)); expectLastCall().times(12); service.addEventUserSpecific(isA(UpdateCompleteRemoteEvent.class)); m_easyMockUtils.replayAll(); m_locationDataManager.doInitialize(service); m_easyMockUtils.verifyAll(); }