SensorParserConfigServiceImpl implements SensorParserConfigService { @Override public Map<String, String> reloadAvailableParsers() { ParserIndex.INSTANCE.reload(); return getAvailableParsers(); } @Autowired  SensorParserConfigServiceImpl(ObjectMapper objectMapper, CuratorFramework client,
      GrokService grokService, ConfigurationsCache cache); @Override SensorParserConfig save(String name, SensorParserConfig sensorParserConfig); @Override SensorParserConfig findOne(String name); @Override Map<String, SensorParserConfig> getAll(); @Override boolean delete(String name); @Override List<String> getAllTypes(); @Override Map<String, String> getAvailableParsers(); @Override Map<String, String> reloadAvailableParsers(); @Override JSONObject parseMessage(ParseMessageRequest parseMessageRequest);  }
@Test public void reloadAvailableParsersShouldReturnParserClasses() { Map<String, String> availableParsers = sensorParserConfigService.reloadAvailableParsers(); assertTrue(availableParsers.size() > 0); assertEquals("org.apache.metron.parsers.GrokParser", availableParsers.get("Grok")); assertEquals("org.apache.metron.parsers.bro.BasicBroParser", availableParsers.get("Bro")); }