@Test public void testAddSyncRoot() { this.props.put(KEY_ACTION, ACTION_ADD); this.props.put(KEY_SYNC_ROOT, new File("/virtual/root")); this.props.put(KEY_EXPECTED_SYNC_TIME, 4000l); this.serviceSettings.addSyncRoot(new File("/virtual/root"), 4000l); verify(this.jobManager, times(1)).addJob(TOPIC_NAME, this.props); }
public void addSyncRoot(final File syncRoot, Long expectedSyncTime) throws IllegalStateException { logger.debug("addSyncRoot(): syncRoot = {}", syncRoot); final Map<String, Object> props = new Hashtable<String, Object>(); props.put(ServiceSettingsConsumerImpl.KEY_ACTION, ServiceSettingsConsumerImpl.ACTION_ADD); props.put(ServiceSettingsConsumerImpl.KEY_SYNC_ROOT, syncRoot); if (expectedSyncTime != null) { props.put(ServiceSettingsConsumerImpl.KEY_EXPECTED_SYNC_TIME, expectedSyncTime); } jobManager.addJob(ServiceSettingsConsumerImpl.TOPIC_NAME, props); }
ServiceSettingsImpl { public void addSyncRoot(final File syncRoot, Long expectedSyncTime) throws IllegalStateException { logger.debug("addSyncRoot(): syncRoot = {}", syncRoot); final Map<String, Object> props = new Hashtable<String, Object>(); props.put(ServiceSettingsConsumerImpl.KEY_ACTION, ServiceSettingsConsumerImpl.ACTION_ADD); props.put(ServiceSettingsConsumerImpl.KEY_SYNC_ROOT, syncRoot); if (expectedSyncTime != null) { props.put(ServiceSettingsConsumerImpl.KEY_EXPECTED_SYNC_TIME, expectedSyncTime); } jobManager.addJob(ServiceSettingsConsumerImpl.TOPIC_NAME, props); } }
ServiceSettingsImpl { public void addSyncRoot(final File syncRoot, Long expectedSyncTime) throws IllegalStateException { logger.debug("addSyncRoot(): syncRoot = {}", syncRoot); final Map<String, Object> props = new Hashtable<String, Object>(); props.put(ServiceSettingsConsumerImpl.KEY_ACTION, ServiceSettingsConsumerImpl.ACTION_ADD); props.put(ServiceSettingsConsumerImpl.KEY_SYNC_ROOT, syncRoot); if (expectedSyncTime != null) { props.put(ServiceSettingsConsumerImpl.KEY_EXPECTED_SYNC_TIME, expectedSyncTime); } jobManager.addJob(ServiceSettingsConsumerImpl.TOPIC_NAME, props); }  }
ServiceSettingsImpl { public void addSyncRoot(final File syncRoot, Long expectedSyncTime) throws IllegalStateException { logger.debug("addSyncRoot(): syncRoot = {}", syncRoot); final Map<String, Object> props = new Hashtable<String, Object>(); props.put(ServiceSettingsConsumerImpl.KEY_ACTION, ServiceSettingsConsumerImpl.ACTION_ADD); props.put(ServiceSettingsConsumerImpl.KEY_SYNC_ROOT, syncRoot); if (expectedSyncTime != null) { props.put(ServiceSettingsConsumerImpl.KEY_EXPECTED_SYNC_TIME, expectedSyncTime); } jobManager.addJob(ServiceSettingsConsumerImpl.TOPIC_NAME, props); }  void addSyncRoot(final File syncRoot, Long expectedSyncTime); void removeSyncRoot(final File syncRoot); }
ServiceSettingsImpl { public void addSyncRoot(final File syncRoot, Long expectedSyncTime) throws IllegalStateException { logger.debug("addSyncRoot(): syncRoot = {}", syncRoot); final Map<String, Object> props = new Hashtable<String, Object>(); props.put(ServiceSettingsConsumerImpl.KEY_ACTION, ServiceSettingsConsumerImpl.ACTION_ADD); props.put(ServiceSettingsConsumerImpl.KEY_SYNC_ROOT, syncRoot); if (expectedSyncTime != null) { props.put(ServiceSettingsConsumerImpl.KEY_EXPECTED_SYNC_TIME, expectedSyncTime); } jobManager.addJob(ServiceSettingsConsumerImpl.TOPIC_NAME, props); }  void addSyncRoot(final File syncRoot, Long expectedSyncTime); void removeSyncRoot(final File syncRoot);  }