JsonConfigFile extends PlainTextConfigFile { @Override public ConfigFileFormat getConfigFileFormat() { return ConfigFileFormat.JSON; } JsonConfigFile(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); someSourceType = ConfigSourceType.LOCAL; when(configRepository.getConfig()).thenReturn(someProperties); when(configRepository.getSourceType()).thenReturn(someSourceType); JsonConfigFile configFile = new JsonConfigFile(someNamespace, configRepository); assertEquals(ConfigFileFormat.JSON, configFile.getConfigFileFormat()); assertEquals(someNamespace, configFile.getNamespace()); assertTrue(configFile.hasContent()); assertEquals(someValue, configFile.getContent()); assertEquals(someSourceType, configFile.getSourceType()); }