}
@Test
public void testRunAndUndo() throws Exception {
EditBlackboard map=new EditBlackboard(SCREEN.x, SCREEN.y, transform, layerToWorld);
PrimitiveShape hole=map.getGeoms().get(0).newHole();
AddVertexCommand command1=new AddVertexCommand(new TestHandler(), map, new StaticBlockingProvider<PrimitiveShape>(hole), Point.valueOf(10,10), true );
AddVertexCommand command2=new AddVertexCommand(new TestHandler(), map, new StaticBlockingProvider<PrimitiveShape>(hole), Point.valueOf(10,15), true );
assertEquals(0, map.getCoords(10,10).size());
assertEquals(0, map.getCoords(10,15).size());
command1.run(new NullProgressMonitor());
command2.run(new NullProgressMonitor());
assertEquals(1, map.getCoords(10,10).size());
assertEquals(1, map.getCoords(10,15).size());
command2.rollback(new NullProgressMonitor());
assertTrue(map.getCoords(10,15)==null || 0==map.getCoords(10,15).size());
assertTrue(0==map.getGeoms(10,15).size());
assertEquals(Point.valueOf(10,10), hole.getPoint(0));
assertEquals(1, hole.getNumPoints());
assertEquals(1, hole.getNumCoords());
command1.rollback(new NullProgressMonitor());
assertTrue(map.getCoords(10,10)==null || 0==map.getCoords(10,10).size());
assertTrue(0==map.getGeoms(10,10).size());
assertEquals(0, hole.getNumPoints());
assertEquals(0, hole.getNumCoords());
}