public static <N> ImmutableGraph<N> singletonGraph(Graph<N> graph, N node) {
        final MutableGraph<N> mutableGraph = GraphBuilder.from(graph).build();
        mutableGraph.addNode(node);
        return ImmutableGraph.copyOf(mutableGraph);
    }
@Test
    public void singletonGraphWithTemplate() {
        final MutableGraph<String> templateGraph = GraphBuilder
                .directed()
                .allowsSelfLoops(true)
                .build();
        final ImmutableGraph<String> singletonGraph = Graphs.singletonGraph(templateGraph, "Test");
        assertThat(singletonGraph.isDirected()).isTrue();
        assertThat(singletonGraph.allowsSelfLoops()).isTrue();
        assertThat(singletonGraph.nodes()).containsExactly("Test");
        assertThat(singletonGraph.edges()).isEmpty();
    }