RobotProjectConfigReader { public RobotProjectConfig readConfiguration(final InputStream contents) { try (Reader reader = new InputStreamReader(contents, StandardCharsets.UTF_8)) { return readConfiguration(reader); } catch (final IOException e) { throw new CannotReadProjectConfigurationException( "Project configuration file '" + RobotProjectConfig.FILENAME + "' cannot be read", e); } }  RobotProjectConfig readConfiguration(final InputStream contents); RobotProjectConfigWithLines readConfigurationWithLines(final InputStream contents);  }
@Test public void testIfConfigurationIsRead_whenDefaultCharsetIsDifferentThanUTF8() throws Exception { final RobotProjectConfig writeConfig = new RobotProjectConfig(); writeConfig.setVariableMappings(Arrays.asList(MAPPING_WITH_SPECIAL_CHARS)); final InputStream stream = writer.writeConfiguration(writeConfig); final RobotProjectConfig readConfig = reader.readConfiguration(stream); assertThat(readConfig.getVariableMappings()).containsOnly(MAPPING_WITH_SPECIAL_CHARS); }