@Test public void sendingServeCoffeeShouldResultInCoffeeServedResponse() { new JavaTestKit(system) {{ ActorRef waiter = system.actorOf(Waiter.props()); waiter.tell(new Waiter.ServeCoffee(new Coffee.Akkaccino()), getRef()); expectMsgEquals(new Waiter.CoffeeServed(new Coffee.Akkaccino())); }}; }
static Props props() { return Props.create(Waiter.class, Waiter::new); }
Waiter extends AbstractLoggingActor { static Props props() { return Props.create(Waiter.class, Waiter::new); } }
Waiter extends AbstractLoggingActor { static Props props() { return Props.create(Waiter.class, Waiter::new); } private  Waiter(); }
Waiter extends AbstractLoggingActor { static Props props() { return Props.create(Waiter.class, Waiter::new); } private  Waiter(); @Override Receive createReceive(); }
Waiter extends AbstractLoggingActor { static Props props() { return Props.create(Waiter.class, Waiter::new); } private  Waiter(); @Override Receive createReceive();  }