TxtConfigFile extends PlainTextConfigFile { @Override public ConfigFileFormat getConfigFileFormat() { return ConfigFileFormat.TXT; } TxtConfigFile(String namespace, ConfigRepository configRepository); @Override ConfigFileFormat getConfigFileFormat();  }
@Test public void testWhenHasContent() throws Exception { Properties someProperties = new Properties(); String key = ConfigConsts.CONFIG_FILE_CONTENT_KEY; String someValue = "someValue"; someProperties.setProperty(key, someValue); when(configRepository.getConfig()).thenReturn(someProperties); TxtConfigFile configFile = new TxtConfigFile(someNamespace, configRepository); assertEquals(ConfigFileFormat.TXT, configFile.getConfigFileFormat()); assertEquals(someNamespace, configFile.getNamespace()); assertTrue(configFile.hasContent()); assertEquals(someValue, configFile.getContent()); }