"tickets: Poirot, tram: 10, double: 1",
"tickets: Joker, tram: 2, double: 2",
"tickets: Batman, tram: 2",
};
public void testLoadUpdatePhantom() throws Exception {
Graph g = new Graph(TEST_GRAPH);
MessageUpdate msg = new MessageUpdate(g, Parser.parseLines(MESSAGE_UPDATE_PHANTOM));
TransportType tram = g.getTransportType("tram");
assertNotNull(tram);
ActorMove[] moves = msg.getMoves();
assertNotNull(moves);
assertEquals(2, moves.length);
assertNotNull(moves[0].getActor());
assertSame(g.getActor("Fantomas"), moves[0].getActor());
assertNotNull(moves[0].getTransportType());
assertSame(tram, moves[0].getTransportType());
assertNull(moves[0].getTargetNode());
assertNotNull(moves[1].getActor());
assertSame(g.getActor("Joker"), moves[1].getActor());
assertNotNull(moves[1].getTransportType());
assertSame(tram, moves[1].getTransportType());
assertNull(moves[1].getTargetNode());
assertNotNull(msg.getCapturedPhantoms());
assertEquals(0, msg.getCapturedPhantoms().size());
ActorTickets[] tickets = msg.getActorTickets();
assertNotNull(tickets);
assertEquals(4, tickets.length);
assertNotNull(tickets[0]);
assertNotNull(tickets[0].getActor());
assertSame(g.getActor("Fantomas"), tickets[0].getActor());
assertNotNull(tickets[0].getTickets());
assertEquals(1, tickets[0].getTickets().size());
assertNotNull(tickets[0].getTickets().get(tram));
assertEquals(10, tickets[0].getTickets().get(tram).intValue());
assertEquals(0, tickets[0].getDoubleTickets());
assertNotNull(tickets[1]);
assertNotNull(tickets[1].getActor());
assertSame(g.getActor("Poirot"), tickets[1].getActor());
assertNotNull(tickets[1].getTickets());
assertEquals(1, tickets[1].getTickets().size());
assertNotNull(tickets[1].getTickets().get(tram));
assertEquals(10, tickets[1].getTickets().get(tram).intValue());
assertEquals(1, tickets[1].getDoubleTickets());
assertNotNull(tickets[2]);
assertNotNull(tickets[2].getActor());
assertSame(g.getActor("Joker"), tickets[2].getActor());
assertNotNull(tickets[2].getTickets());
assertEquals(1, tickets[2].getTickets().size());
assertNotNull(tickets[2].getTickets().get(tram));
assertEquals(2, tickets[2].getTickets().get(tram).intValue());
assertEquals(2, tickets[2].getDoubleTickets());
assertNotNull(tickets[3]);
assertNotNull(tickets[3].getActor());
assertSame(g.getActor("Batman"), tickets[3].getActor());
assertNotNull(tickets[3].getTickets());
assertEquals(1, tickets[3].getTickets().size());
assertNotNull(tickets[3].getTickets().get(tram));
assertEquals(2, tickets[3].getTickets().get(tram).intValue());
assertEquals(0, tickets[3].getDoubleTickets());