public String uniqueHash() {
        return Util.digest(this.vertices().
                filter(v -> !(v instanceof QueueVertex) && !(v instanceof SeparatorVertex)). // has no metadata
                map(Vertex::getSourceWithMetadata).
                map(SourceWithMetadata::uniqueHash).
                sorted().
                collect(Collectors.joining()));
    }
@Test
    public void complexConsistencyTest() throws Exception {
        for (int i = 0; i < 10; ++i) {
            Graph g1 = IRHelpers.samplePipeline().getGraph();
            Graph g2 = IRHelpers.samplePipeline().getGraph();
            assertEquals(g1.uniqueHash(), g2.uniqueHash());
        }
    }