class CoffeeHouse extends AbstractLoggingActor {

    public static Props props(int caffeineLimit){
        return Props.create(CoffeeHouse.class, () -> new CoffeeHouse(caffeineLimit));
    }

}

class CoffeeHouseTest extends AbstractLoggingActor {

  @Test
  public void shouldCreateChildActorCalledBaristaWhenCreated() {

    new JavaTestKit(system) {{
      system.actorOf(CoffeeHouse.props(Integer.MAX_VALUE), "create-barista");
      expectActor(this, "/user/create-barista/waiter");
    }};
  }

}