BasicBroParser extends BasicParser { @Override public void configure(Map<String, Object> parserConfig) { setReadCharset(parserConfig); }  @Override void configure(Map<String, Object> parserConfig); @Override void init(); @Override @SuppressWarnings("unchecked") List<JSONObject> parse(byte[] msg); static final ThreadLocal<NumberFormat> DECIMAL_FORMAT; }
@Test public void getsReadCharsetFromConfig() { Map<String, Object> config = new HashMap<>(); config.put(MessageParser.READ_CHARSET, StandardCharsets.UTF_16.toString()); broParser.configure(config); assertThat(broParser.getReadCharset(), equalTo(StandardCharsets.UTF_16)); }
@Test public void getsReadCharsetFromDefault() { Map<String, Object> config = new HashMap<>(); broParser.configure(config); assertThat(broParser.getReadCharset(), equalTo(StandardCharsets.UTF_8)); }