@Ignore
public void processQueuedSettlement() throws GameEngineException {
API api = new API();
Long boardId = null;
String playerName = "one";
ScriptableObject board = api.joinBoard(boardId, playerName);
assertEquals(32, board.get("size"));
board = api.save(board);
String settlementPoint = "{\"r\":1,\"g\":1,\"b\":1}";
String resources = "{\"WHEAT\":1,\"FUR\":1,\"STONE\":1}";
String settlementName = "HAMLET";
api.queueSettlement(board, playerName, settlementPoint, settlementName,
resources);
api.endTurn(board);
// see if the queued location got cleared
ScriptableObject scriptableObject3 = (ScriptableObject) ((ScriptableObject) board
.get("players")).get(playerName);
ScriptableObject queuedSettlements = (ScriptableObject) scriptableObject3
.get("queuedSettlements");
assertEquals(0, queuedSettlements.size());
// see if the queued resources got cleared
ScriptableObject queuedSettlementsResources = (ScriptableObject) scriptableObject3
.get("queuedSettlementsResources");
assertEquals(0, queuedSettlementsResources.size());
// see if the settlement got built
// board.settlementLocations
assertEquals(1,
((ScriptableObject) board.get("settlementLocations")).size());
assertEquals(settlementName,
((ScriptableObject) board.get("settlementLocations"))
.get(settlementPoint));
// board.settlementOwnership
assertEquals(1,
((ScriptableObject) board.get("settlementOwnership")).size());
assertEquals(playerName,
((ScriptableObject) board.get("settlementOwnership"))
.get(settlementPoint));
// board.players[playerName].settlements
ScriptableObject scriptableObject2 = (ScriptableObject) scriptableObject3
.get("settlements");
assertEquals(1, scriptableObject2.size());
ScriptableObject scriptableObject = (ScriptableObject) scriptableObject2
.get(settlementPoint);
assertEquals(settlementName, scriptableObject.get("name"));
}