@Test
public void testShouldSendUpdateWhenUserPosts() {

    //Given
    Props props = Props.create(Chatroom.class);
    TestActorRef<Chatroom> ref = TestActorRef.create(system, props);
    Chatroom chatroom = ref.underlyingActor();
    final TestProbe probe = new TestProbe(system);
    UserRef userRef = new UserRef(probe.ref(), "user");
    chatroom.joinChatroom(new Messages.JoinChatroom(userRef));
    //When
    Messages.PostToChatroom msg = new Messages.PostToChatroom("test", "user");
    ref.tell(msg, probe.ref());
    //Then
    probe.expectMsg(msg);
}