@Test
public void testShouldAddUserToJoinedUsersWhenJoiningUnitTest() {

    Props props = Props.create(Chatroom.class);
    TestActorRef<Chatroom> ref = TestActorRef.create(system, props);
    Chatroom chatroom = ref.underlyingActor();

    UserRef userRef = new UserRef(system.deadLetters(), "user");
    Messages.JoinChatroom request = new Messages.JoinChatroom(userRef);
    chatroom.joinChatroom(request);

    assertEquals(chatroom.joinedUsers.get(0), userRef);
}