@Test public void testGetFactoryConfig() { FileBasedJobLockFactoryManager mgr = new FileBasedJobLockFactoryManager(); Config sysConfig1 = ConfigFactory.empty(); Assert.assertTrue(mgr.getFactoryConfig(sysConfig1).isEmpty()); Config sysConfig2 = sysConfig1.withValue("some.prop", ConfigValueFactory.fromAnyRef("test")); Assert.assertTrue(mgr.getFactoryConfig(sysConfig2).isEmpty()); Config sysConfig3 = sysConfig2.withValue(FileBasedJobLockFactoryManager.CONFIG_PREFIX + "." + FileBasedJobLockFactory.LOCK_DIR_CONFIG, ConfigValueFactory.fromAnyRef("/tmp")); Config factoryCfg3 = mgr.getFactoryConfig(sysConfig3); Assert.assertEquals(factoryCfg3.getString(FileBasedJobLockFactory.LOCK_DIR_CONFIG), "/tmp"); }
@Override protected Config getFactoryConfig(Config sysConfig) { return sysConfig.hasPath(CONFIG_PREFIX) ? sysConfig.getConfig(CONFIG_PREFIX) : ConfigFactory.empty(); }
FileBasedJobLockFactoryManager extends AbstractJobLockFactoryManager<FileBasedJobLock, FileBasedJobLockFactory> { @Override protected Config getFactoryConfig(Config sysConfig) { return sysConfig.hasPath(CONFIG_PREFIX) ? sysConfig.getConfig(CONFIG_PREFIX) : ConfigFactory.empty(); } }
FileBasedJobLockFactoryManager extends AbstractJobLockFactoryManager<FileBasedJobLock, FileBasedJobLockFactory> { @Override protected Config getFactoryConfig(Config sysConfig) { return sysConfig.hasPath(CONFIG_PREFIX) ? sysConfig.getConfig(CONFIG_PREFIX) : ConfigFactory.empty(); }  }
FileBasedJobLockFactoryManager extends AbstractJobLockFactoryManager<FileBasedJobLock, FileBasedJobLockFactory> { @Override protected Config getFactoryConfig(Config sysConfig) { return sysConfig.hasPath(CONFIG_PREFIX) ? sysConfig.getConfig(CONFIG_PREFIX) : ConfigFactory.empty(); }   }
FileBasedJobLockFactoryManager extends AbstractJobLockFactoryManager<FileBasedJobLock, FileBasedJobLockFactory> { @Override protected Config getFactoryConfig(Config sysConfig) { return sysConfig.hasPath(CONFIG_PREFIX) ? sysConfig.getConfig(CONFIG_PREFIX) : ConfigFactory.empty(); }   static final String CONFIG_PREFIX; }