/**
 * Created by andybb on 18.03.15.
 */


import org.junit.Test;
import static org.junit.Assert.*;

import com.mygdx.game.controllers.GameNetworkController;
import com.mygdx.game.controllers.PlayerNetworkController;

import java.util.concurrent.TimeUnit;


public class NetworkTest {
    @Test
    public void testGameInitialization() throws InterruptedException {
        GameNetworkController game1 = new GameNetworkController();
        GameNetworkController game2 = new GameNetworkController();

        game1.startGame("andybb");
        assertEquals("Username for player 1 given and in model should be equal ", "andybb", game1.getPlayerController().getPlayer().getUsername());

        TimeUnit.SECONDS.sleep(1);
        game2.startGame("mats");
        assertEquals("Username for player 2 given and in model should be equal ", "mats", game2.getPlayerController().getPlayer().getUsername());

    }

    @Test
    public void testFireOperation() throws InterruptedException{

    }
}

@@ -60,16 +60,41 @@
 t.Test;%0A
+import org.junit.Before;%0A
 import s
@@ -180,67 +180,8 @@
 ler;
-%0Aimport com.mygdx.game.controllers.PlayerNetworkController;
 %0A%0Aim
@@ -249,118 +249,137 @@
 t %7B%0A
-    @Test%0A    public void testGameInitialization() throws InterruptedException %7B%0A        GameNetworkController
+%0A    private GameNetworkController game1;%0A    private GameNetworkController game2;%0A%0A    @Before%0A    public void setup() %7B%0A       
  gam
@@ -420,16 +420,28 @@
         
+game2 = new 
 GameNetw
@@ -457,45 +457,99 @@
 ller
- game2 = new GameNetworkController();
+();%0A    %7D%0A%0A    @Test%0A    public void testGameInitialization() throws InterruptedException %7B
 %0A%0A  
@@ -941,24 +941,326 @@
 ername());%0A%0A
+        TimeUnit.SECONDS.sleep(11);%0A        assertEquals(%22The opponent of player 1 should player 2%22, %22mats%22, game1.getPlayerController().getOpponent().getUsername());%0A        assertEquals(%22The opponent of player 2 should player 1%22, %22andybb%22, game2.getPlayerController().getOpponent().getUsername());%0A%0A%0A
     %7D%0A%0A    @

Add test to check that the opponent is set correctly