### Question:
JPDL3Metadata { public List<JPDL3TaskNodeMetadata> getTaskNodes() { return this.taskNodes; } private  JPDL3Metadata(); @SuppressWarnings( {"unchecked", "cast"} ) static JPDL3Metadata instance( InputStream stream ); String getPdName(); void setPdName( String pdName ); JPDL3StartStateMetadata getStartStateMetadata(); JPDL3EndStateMetadata getEndStateMetadata(); void setStartStateMetadata( JPDL3StartStateMetadata jPDL3StartStateMetadata ); void setEndStateMetadata( JPDL3EndStateMetadata jPDL3EndStateMetadata ); List<JPDL3SwimlaneMetadata> getSwimlanes(); void setSwimlanes( List<JPDL3SwimlaneMetadata> swimlanes ); List<JPDL3TaskNodeMetadata> getTaskNodes(); void setTaskNodes( List<JPDL3TaskNodeMetadata> taskNodes );  }### Answer:
@Test public void shouldHaveATaskNode() { List<JPDL3TaskNodeMetadata> taskNodes = metadata.getTaskNodes(); assertThat(taskNodes.size() > 0, is(true)); for (JPDL3TaskNodeMetadata jPDL3TaskNodeMetadata : taskNodes) { if (jPDL3TaskNodeMetadata.getName().equals("Phase01")) { List<JPDL3TaskMetadata> tasks = jPDL3TaskNodeMetadata.getTasks(); assertThat(tasks.size() == 2, is(true)); for (JPDL3TaskMetadata jPDL3TaskMetadata : tasks) { if (jPDL3TaskMetadata.getName().equals("Task01_Phase01")) { String swimlane = jPDL3TaskMetadata.getSwimlane(); assertThat(swimlane, is("SL1")); } } } List<JPDL3TransitionMetadata> transitions = jPDL3TaskNodeMetadata.getTransitions(); for (JPDL3TransitionMetadata transitionMetadata : transitions) { String transitionName = transitionMetadata.getName(); if (transitionName.equals("Tr01_Phase01")) { assertThat(transitionMetadata.getTo(), is("Phase02")); } else if (transitionName.equals("Tr01_Phase02")) { assertThat(transitionMetadata.getTo(), is("Phase03")); } else if (transitionName.equals("Tr01_Phase03")) { assertThat(transitionMetadata.getTo(), is("Phase04")); } else if (transitionName.equals("Tr01_Phase04")) { assertThat(transitionMetadata.getTo(), is("Phase05")); } else if (transitionName.equals("Tr01_Phase05")) { assertThat(transitionMetadata.getTo(), is("Phase06")); } else if (transitionName.equals("Tr01_Phase06")) { assertThat(transitionMetadata.getTo(), is("S1")); } } } }