import me.hugmanrique.pokedata.maps.Map;
import me.hugmanrique.pokedata.roms.Game;
import me.hugmanrique.pokedata.roms.ReadableROM;
import org.junit.Test;

public class MapLoadingTest extends ROMTest {
    /**
     * Load up the ROM, check Pallet Town data and exit
     */
    @Test
    public void testMapDataIntegrity() {
        ReadableROM rom = load();

        checkFireRed(rom);


        // Pallet town is
        Map map = Map.load(rom, data, 3, 0);

    }
}

@@ -1,28 +1,76 @@
+import me.hugmanrique.pokedata.loaders.ROMData;%0A
 import me.hugmanrique.pokeda
@@ -117,17 +117,116 @@
 ata.
-roms.Game
+maps.MapData;%0Aimport me.hugmanrique.pokedata.maps.MapHeader;%0Aimport me.hugmanrique.pokedata.maps.MapTileData
 ;%0Aim
@@ -528,16 +528,54 @@
 (rom);%0A%0A
+        ROMData data = loadData(rom);%0A
 %0A       
@@ -592,16 +592,33 @@
  town is
+ in bank 3, map 0
 %0A       
@@ -652,20 +652,1183 @@
 ta, 3, 0);%0A%0A
+        // Check header%0A        MapHeader header = map.getHeader();%0A%0A        checkPointer(%22Map data%22, header.getMapPtr(), 0x2DD4C0);%0A        checkPointer(%22Event data%22, header.getSpritesPtr(), 0x3B4E50);%0A        checkPointer(%22Map scripts%22, header.getScriptPtr(), 0x16545A);%0A        checkPointer(%22Connections%22, header.getConnectPtr(), 0x35276C);%0A%0A        // Check data%0A        MapData mapData = map.getData();%0A%0A        checkPointer(%22Border%22, mapData.getBorderTilePtr(), 0x2DD0F8);%0A        checkPointer(%22Tile structure%22, mapData.getMapTilesPtr(), 0x2DD100);%0A        checkPointer(%22Global tileset%22, mapData.getGlobalTilesetPtr(), 0x2D4A94);%0A        checkPointer(%22Local tileset%22, mapData.getLocalTilesetPtr(), 0x2D4AAC);%0A%0A        // TODO Check scripts, connections...%0A    %7D%0A%0A    private void checkPointer(String name, long pointer, long expected) %7B%0A        if (pointer != expected) %7B%0A            throwFail(name, pointer, expected);%0A        %7D%0A    %7D%0A%0A    private void throwFail(String name, Object obj, Object comparedTo) %7B%0A        String message = String.format(%22%25s don't/doesn't match (got %25s, expected: %25s)%22, name, obj, comparedTo);%0A%0A        throw new Error(message);%0A
     %7D%0A%7D%0A

Add Map loading test