@Test
public void aggregateMessagesAndStopSelf() {

    new TestKit(actorSystem) {{
        final TestProbe initialReceiver = TestProbe.apply(actorSystem);
        final ActorRef underTest =
                actorSystem.actorOf(MessageAggregator.props(initialReceiver.ref(), Integer.class, 3, ONE_DAY));
        watch(underTest);
        underTest.tell(true, getRef());
        underTest.tell(0, getRef());
        underTest.tell(1, getRef());
        underTest.tell(2, getRef());
        initialReceiver.expectMsg(true);
        expectMsg(Arrays.asList(0, 1, 2));
        expectTerminated(underTest);
    }};
}