@Test
public void toDTO() {

    Node node = dependencyGraph.getNode("v1");
    NodeDTO nodeDTO = NodeMapper.toDTO(node, dependencyGraph);
    assertThat(nodeDTO.getName(), is("v1"));
    assertThat(nodeDTO.getOutgoingDeps(), hasSize(2));
    assertThat(nodeDTO.getOutgoingDeps().get(0).getSourceName(), is("v1"));
    assertThat(nodeDTO.getOutgoingDeps().get(0).getTargetName(), is("v2"));
    assertThat(nodeDTO.getOutgoingDeps().get(0).getTypeName(), is("READ_ONLY"));
    assertThat(nodeDTO.getParents(), hasSize(1));
    assertThat(nodeDTO.getParents().get(0).getSourceName(), is("p1"));
}