### Question:
LoggerFormatter implements EventListener, EventWriter { @SuppressWarnings("unchecked") private void processFile() { if (filePath != null) { String fc = loadFromUrl(toURL(filePath)); if (!fc.isEmpty()) { if (!fc.endsWith("]")) fc = fc + ']'; Gson gson = new Gson(); List<Map<String, Object>> json = gson.fromJson(fc, new ArrayList<Map<String, Object>>().getClass()); eventBus.send(new SimulationFinished(eventBus.getTime(),eventBus.getTimeMillis(),createSimulationResult(json))); } } } LoggerFormatter(AppendableBuilder builder);  LoggerFormatter(AppendableBuilder builder, String[] options); @Override void setEventPublisher(EventPublisher publisher); @Override void setEventBus(EventBus eventBus); SimulationResult createSimulationResult(List<Map<String, Object>> mapList); List<GroupResult> createGroupResultList(List<Map<String, Object>> mapList);  }### Answer:
@Test public void testProcessFile() { try { LoggerFormatter stf = new LoggerFormatter(new AppendableBuilder("file: PluginFactory pf = new PluginFactory(); PerfRuntimeOptions options = new PerfRuntimeOptions(); Plugins plugins = new Plugins(this.getClass().getClassLoader(), pf, options); plugins.addPlugin(stf); plugins.setEventBusOnPlugins(eventBus); eventBus.send(new SimulationStarted(eventBus.getTime(),eventBus.getTimeMillis(), "test")); eventBus.send(new GroupFinished(eventBus.getTime(),eventBus.getTimeMillis(),0, new PerfGroup("group", "test.feature", 1, 10, null),new GroupResult("test", new Result(Status.PASSED, Duration.ofMillis(1000L), null), LocalDateTime.now(), LocalDateTime.now()))); eventBus.send(new SimulationFinished(eventBus.getTime(),eventBus.getTimeMillis(), null)); } catch (CucumberException e) { fail("Issue"); } try { eventBus.registerHandlerFor(StatisticsStarted.class, statisticsStartedListener); LoggerFormatter stf = new LoggerFormatter(new AppendableBuilder("file: PluginFactory pf = new PluginFactory(); PerfRuntimeOptions options = new PerfRuntimeOptions(); Plugins plugins = new Plugins(this.getClass().getClassLoader(), pf, options); plugins.addPlugin(stf); plugins.setEventBusOnPlugins(eventBus); eventBus.send(new PerfRunStarted(eventBus.getTime(),eventBus.getTimeMillis())); } catch (CucumberException e) { fail("Issue"); } assertTrue(isStatisticsStarted); assertTrue(deleteFile("C:/test/log.json")); }