BasicAsaParser extends BasicParser { @Override public void configure(Map<String, Object> parserConfig) { setReadCharset(parserConfig); String timeZone = (String) parserConfig.get("deviceTimeZone"); if (timeZone != null) deviceClock = Clock.system(ZoneId.of(timeZone)); else { deviceClock = Clock.systemUTC(); LOG.warn("[Metron] No device time zone provided; defaulting to UTC"); } }  @Override void configure(Map<String, Object> parserConfig); @Override void init(); @Override List<JSONObject> parse(byte[] rawMessage);  }
@Test public void getsReadCharsetFromConfig() { parserConfig.put(MessageParser.READ_CHARSET, StandardCharsets.UTF_16.toString()); asaParser.configure(parserConfig); assertThat(asaParser.getReadCharset(), equalTo(StandardCharsets.UTF_16)); }
@Test public void getsReadCharsetFromDefault() { asaParser.configure(parserConfig); assertThat(asaParser.getReadCharset(), equalTo(StandardCharsets.UTF_8)); }