### Question:
Graph { public String getName() { return name; } Graph(final Workflow workflow); String getName(); Parameters getParameters(); Global getGlobal(); Start getStart(); End getEnd(); NodeBase getNodeByName(final String name); Collection<NodeBase> getNodes(); Credentials getCredentials();  }### Answer:
@Test public void testNameIsCorrect() { final Node a = MapReduceActionBuilder.create().withName("A").build(); MapReduceActionBuilder.create().withName("B").withParent(a).build(); MapReduceActionBuilder.create().withName("C").withParent(a).build(); final String name = "workflow-name"; final Workflow workflow = new WorkflowBuilder().withName(name).withDagContainingNode(a).build(); final Graph graph = new Graph(workflow); assertEquals(name, graph.getName()); }