int numRemoteSources(EdgeDef edge) {
        Set<Address> edgeSources = sources.get(edge.edgeId());
        return edgeSources.contains(localAddress) ? edgeSources.size() - 1 : edgeSources.size();
    }
@Test
    public void when_traversingDAGAndCheckNumberOfConnections() {
        VertexDef vertex_1 = createMockVertex(1);
        VertexDef vertex_2 = createMockVertex(2);
        List<VertexDef> vertices = Arrays.asList(vertex_1, vertex_2);
        EdgeDef edge_1_2 = createEdge(vertex_1, vertex_2, null);

        DagNodeUtil util = new DagNodeUtil(vertices, allAddresses, node1Address);
        assertEquals(0, util.numRemoteSources(edge_1_2));
    }