ExporterDirector extends Actor { @Override public String getName() { return name; } ExporterDirector(final ExporterDirectorContext context); ActorFuture<Void> startAsync(final ActorScheduler actorScheduler); ActorFuture<Void> stopAsync(); @Override String getName(); ExportersState getState();  }
@Test public void shouldConfigureAllExportersProperlyOnStart() { startExporterDirector(exporterDescriptors); verify(exporters.get(0), TIMEOUT).open(any()); verify(exporters.get(1), TIMEOUT).open(any()); exporters.forEach( exporter -> { assertThat(exporter.getController()).isNotNull(); assertThat(exporter.getContext().getLogger()).isNotNull(); assertThat(exporter.getContext().getConfiguration()).isNotNull(); }); final Context exporterContext1 = exporters.get(0).getContext(); assertThat(exporterContext1.getConfiguration().getId()).isEqualTo(EXPORTER_ID_1); assertThat(exporterContext1.getConfiguration().getArguments()) .isEqualTo(Collections.singletonMap("x", 1)); assertThat(exporterContext1.getLogger().getName()) .isEqualTo(Loggers.getExporterLogger(EXPORTER_ID_1).getName()); final Context exporterContext2 = exporters.get(1).getContext(); assertThat(exporterContext2.getConfiguration().getId()).isEqualTo(EXPORTER_ID_2); assertThat(exporterContext2.getConfiguration().getArguments()) .isEqualTo(Collections.singletonMap("y", 2)); assertThat(exporterContext2.getLogger().getName()) .isEqualTo(Loggers.getExporterLogger(EXPORTER_ID_2).getName()); }