### Question:
DiscoverActor extends AbstractActor { public static Props props(Observer<Thing> observer, ThingFilter filter, Duration timeout) { return Props.create(DiscoverActor.class, () -> new DiscoverActor(observer, filter, timeout)); } DiscoverActor(Observer<Thing> subject, ThingFilter filter, Duration timeout); @Override void preStart(); @Override void postStop(); @Override Receive createReceive(); static Props props(Observer<Thing> observer,
                              ThingFilter filter,
                              Duration timeout);  }### Answer:
@Test public void discoveredShouldAddThingsToObserver() { final Props props = DiscoverActor.props(observer, filter, timeout); final TestActorRef<DiscoverActor> ref = TestActorRef.create(system, props); ExposedThing exposedThing = new ExposedThing(null); Map<String, ExposedThing> things = Map.of("counter", exposedThing); ask(ref, new Discovered(things), timeout).toCompletableFuture(); verify(observer).onNext(any()); }