### Question:
JsonParser implements ApplicationConfigurationParser { @Override public ApplicationConfiguration parseApplicationConfiguration(File file) throws IOException { try (FileInputStream fileInputStream = new FileInputStream(file)) { return parseApplicationConfiguration(fileInputStream); } }  @Override ApplicationConfiguration parseApplicationConfiguration(File file); @Override ApplicationConfiguration parseApplicationConfiguration(String filename);  }### Answer:
@Test public void canReadApplicationConfigurationFromFile() throws IOException { String filename = getClass().getResource("/tenniskafe.json").getFile(); File file = new File(filename); JsonParser applicationConfigurationParser = new JsonParser(); ApplicationConfiguration applicationConfiguration = applicationConfigurationParser.parseApplicationConfiguration(file); assertEquals("tenniskafe", applicationConfiguration.getApplicationName()); }
@Test public void canReadApplicationConfigurationFromFileName() throws IOException { String filename = getClass().getResource("/tenniskafe.json").getFile(); JsonParser applicationConfigurationParser = new JsonParser(); ApplicationConfiguration applicationConfiguration = applicationConfigurationParser .parseApplicationConfiguration(filename); assertEquals("tenniskafe", applicationConfiguration.getApplicationName()); }