### Question:
KiteConfigurationService implements Service { public Configuration getKiteConf() { return kiteConf; }  @Override void init(Services services); Configuration getKiteConf(); @Override void destroy(); @Override Class<? extends Service> getInterface(); static final String CONF_PREFIX; static final String KITE_CONFIGURATION; }### Answer:
@Test public void noKiteConfiguration() throws ServiceException, FileNotFoundException, IOException { Assume.assumeTrue(!distributed); kiteConfigPath = new Path("target/kite-conf-serv"); setupKiteConfigurationService(kiteConfigPath, true, false, false); Assert.assertNull(Services.get().get(KiteConfigurationService.class).getKiteConf()); }
@Test public void singleKiteConfiguration() throws ServiceException, IOException { Assume.assumeTrue(!distributed); kiteConfigPath = new Path("target/kite-conf-serv"); setupKiteConfigurationService(kiteConfigPath, true, true, false); Configuration serviceKiteConf = Services.get().get(KiteConfigurationService.class).getKiteConf(); Assert.assertNotNull(serviceKiteConf); Assert.assertEquals("test.value",serviceKiteConf.get("test.property")); }
@Test public void multipleKiteConfigurations() throws ServiceException, IOException { Assume.assumeTrue(!distributed); kiteConfigPath = new Path("target/kite-conf-serv"); setupKiteConfigurationService(kiteConfigPath, true, true, true); Configuration serviceKiteConf = Services.get().get(KiteConfigurationService.class).getKiteConf(); Assert.assertNotNull(serviceKiteConf); Assert.assertEquals("test.value",serviceKiteConf.get("test.property")); Assert.assertEquals("second.value",serviceKiteConf.get("second.property")); }
@Test public void hdfsKiteConfigurations() throws ServiceException, IOException { Assume.assumeTrue(distributed); kiteConfigPath = new Path("hdfs: setupKiteConfigurationService(kiteConfigPath, true, true, true); Configuration serviceKiteConf = Services.get().get(KiteConfigurationService.class).getKiteConf(); Assert.assertNotNull(serviceKiteConf); Assert.assertEquals("test.value",serviceKiteConf.get("test.property")); Assert.assertEquals("second.value",serviceKiteConf.get("second.property")); }