@Test public void testIsGameReady() throws Exception { UserProfile profile = new UserProfile("test", "test"); Room room = new RoomFFA("testRoom"); room.addUser(profile); profile.setCurrentroom(room); doReturn(profile).when(service).getUserBySession(anyString()); assertFalse(gameServer.isGameReady(anyString())); UserProfile profile1 = new UserProfile("test1", "test1"); room.addUser(profile1); assertTrue(gameServer.isGameReady(anyString())); }