/**
  * Test method for 'undoAction()' for accuracy.
  *
  * <p>Verify redoAction() will remove the ActivityDiagram and the ActivityGraph to the
  * UMLModelManager instance.
  *
  * @throws Exception to Junit
  */
 public void testUndoAction() throws Exception {
   action.executeAction();
   action.undoAction();
   assertTrue(
       "The ActivityGraph list should be empty.", UML_MODEL_MANAGER.getActivityGraphs().isEmpty());
   assertTrue("The diagram list should be empty.", UML_MODEL_MANAGER.getDiagrams().isEmpty());
 }
 /**
  * Validate that the ActivityDiagram and the ActivityGraph are added to the UMLModelManager
  * instance.
  */
 private void validateActivityDiagram() {
   ActivityGraph activityGraph = UML_MODEL_MANAGER.getActivityGraphs().get(0);
   assertNotNull("The ActivityGraph should not be null.", activityGraph);
   Diagram diagram = UML_MODEL_MANAGER.getDiagrams().get(0);
   assertNotNull("The diagram should not be null.", diagram);
   // check the owner
   Uml1SemanticModelBridge modelBridge = (Uml1SemanticModelBridge) diagram.getOwner();
   assertNotNull("The Uml1SemanticModelBridge should not be null.", modelBridge);
   assertSame("The owner is incorrect.", activityGraph, modelBridge.getElement());
 }