GraphicalComponent extends AbstractComponent { public GraphicalModel getModelRole() { return model.get(); } GraphicalComponent(); boolean isLeaf(); GraphicalModel getModelRole();  }
@Test public void testGraphicalComponentModelPersistence() { GraphicalComponent a = new GraphicalComponent(); GraphicalComponent b = new GraphicalComponent(); a.getModelRole().setGraphicURI(uriOne); b.getModelRole().setGraphicURI(uriTwo); ModelStatePersistence persisterA = a.getCapability(ModelStatePersistence.class); ModelStatePersistence persisterB = b.getCapability(ModelStatePersistence.class); Assert.assertNotNull(persisterA); Assert.assertNotNull(persisterB); String stateA = persisterA.getModelState(); String stateB = persisterB.getModelState(); persisterA.setModelState(stateB); persisterB.setModelState(stateA); Assert.assertEquals(b.getModelRole().getGraphicURI(), uriOne); Assert.assertEquals(a.getModelRole().getGraphicURI(), uriTwo); }