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 shouldLogMessageWhenCreated() {

        new JavaTestKit(system) {{
            interceptDebugLogMessage(this, ".*[Oo]pen.*", 1, () -> system.actorOf(CoffeeHouse.props(Integer.MAX_VALUE)));
        }};
    }

}