@Test
public void testToDTO() {

    Node v1 = dependencyGraph.getNode("v1");
    Node v3 = dependencyGraph.getNode("v3");
    Dependency edge = dependencyGraph.getEdge(v1, v3);
    assertThat(v1, notNullValue());
    assertThat(v3, notNullValue());
    assertThat(edge, notNullValue());
    DependencyDTO dto = DependencyMapper.toDTO(edge);
    assertThat(dto, notNullValue());
    assertThat(dto.getSourceName(), is("v1"));
    assertThat(dto.getTargetName(), is("v3"));
    assertThat(dto.getTypeName(), is("CREATE"));
    assertThat(dto.getBaseDependencies(), hasSize(1));
    DependencyDTO baseDep = dto.getBaseDependencies().get(0);
    assertThat(baseDep.getSourceName(), is("v4"));
    assertThat(baseDep.getTargetName(), is("v5"));
    assertThat(baseDep.getTypeName(), is("READ_WRITE"));
}