@Test
public void st1nt2IsTheNodeTemplateWhichPredecessorsHasNoPredecessors() throws Exception {

    TTopologyTemplate topologyTemplate = new TTopologyTemplate();
    TNodeTemplate nt1 = new TNodeTemplate();
    TNodeTemplate nt2 = new TNodeTemplate();
    TNodeTemplate nt3 = new TNodeTemplate();
    nt1.setId("NT1");
    nt2.setId("NT2");
    nt3.setId("NT3");
    TRelationshipTemplate rt = new TRelationshipTemplate();
    TRelationshipTemplate.SourceOrTargetElement targetElement = new TRelationshipTemplate.SourceOrTargetElement();
    targetElement.setRef(nt2);
    rt.setTargetElement(targetElement);
    TRelationshipTemplate.SourceOrTargetElement sourceElement = new TRelationshipTemplate.SourceOrTargetElement();
    sourceElement.setRef(nt1);
    rt.setSourceElement(sourceElement);
    TRelationshipTemplate rt2 = new TRelationshipTemplate();
    TRelationshipTemplate.SourceOrTargetElement targetElement1 = new TRelationshipTemplate.SourceOrTargetElement();
    targetElement1.setRef(nt1);
    rt2.setTargetElement(targetElement1);
    TRelationshipTemplate.SourceOrTargetElement sourceElement1 = new TRelationshipTemplate.SourceOrTargetElement();
    sourceElement1.setRef(nt3);
    rt2.setSourceElement(sourceElement1);
    List<TEntityTemplate> entityTemplates = topologyTemplate.getNodeTemplateOrRelationshipTemplate();
    entityTemplates.add(nt1);
    entityTemplates.add(nt2);
    entityTemplates.add(nt3);
    entityTemplates.add(rt);
    List<TNodeTemplate> expectedNodeTemplates = new ArrayList<>();
    expectedNodeTemplates.add(nt1);
    assertEquals(expectedNodeTemplates, splitting.getNodeTemplatesWhichPredecessorsHasNoPredecessors(topologyTemplate));
}