### Question:
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public void setConfiguration(Configuration cfg) throws ConfigurationException { combineSpaces = cfg.getBoolean("combine-spaces", false); newLineAtEnd = cfg.getBoolean("newline-at-end", true); }  @Override byte[] apply(byte[] bytes); @Override void setConfiguration(Configuration cfg);  }### Answer:
@Test void testValuesChangedByConfiguration() throws ConfigurationException { RemoveNewLinesMapper mapper = new RemoveNewLinesMapper(); SimpleConfiguration cfg = new SimpleConfiguration(); cfg.put("combine-spaces", "true"); cfg.put("newline-at-end", "false"); mapper.setConfiguration(cfg); assertTrue(mapper.combineSpaces); assertFalse(mapper.newLineAtEnd); }
@Test void testDefaultValues() throws ConfigurationException { RemoveNewLinesMapper mapper = new RemoveNewLinesMapper(); assertFalse(mapper.combineSpaces); assertTrue(mapper.newLineAtEnd); SimpleConfiguration cfg = new SimpleConfiguration(); mapper.setConfiguration(cfg); assertFalse(mapper.combineSpaces); assertTrue(mapper.newLineAtEnd); }