package endtoend;

import static org.junit.Assert.assertEquals;
import me.moodcat.api.models.RoomModel;
import me.moodcat.api.models.SongModel;

import org.junit.Test;

public class ApiEndToEndTest extends EndToEndTest {

    @Test
    public void canRetrieveRooms() {
        RoomModel room = this.performGETRequest(RoomModel.class, "rooms/1");
        
        assertEquals(1, room.getId().intValue());
        assertEquals(1, room.getNowPlaying().getSong().getId().intValue());
    }
    
    @Test
    public void canRetrieveSongs() {
        SongModel song = this.performGETRequest(SongModel.class, "songs/1");
        
        assertEquals(1, song.getId().intValue());
        assertEquals(202330997, song.getSoundCloudId().intValue());
    }

}

@@ -57,16 +57,79 @@
 Equals;%0A
+%0Aimport java.util.List;%0A%0Aimport javax.ws.rs.core.GenericType;%0A%0A
 import m
@@ -319,17 +319,16 @@
 ieveRoom
-s
 () %7B%0A   
@@ -722,32 +722,32 @@
 ().intValue());%0A
-
         assertEq
@@ -803,12 +803,255 @@
 );%0A    %7D
+%0A    %0A    @Test%0A    public void canRetrieveRooms() %7B%0A        List%3CRoomModel%3E rooms = this.performGETRequestWithGenericType(new GenericType%3CList%3CRoomModel%3E%3E()%7B%7D, %22rooms%22);%0A        %0A        assertEquals(1, rooms.get(0).getId().intValue());%0A    %7D
 %0A%0A%7D%0A

Test that might be failing. Let's see.