### Question:
AgnosticGraphFactory implements VisualizedGraphFactory { @Override public VisualizedGraph create(ILayer... layers) { boolean singleNode = layers.length == 1 && layers[0].getNodes().length == 1; return new AgnosticVisualizedGraph(createCascade(layers), calculateSize(layers), singleNode); } AgnosticGraphFactory(TreePresentationProperties properties); @Override VisualizedGraph create(ILayer... layers);  }### Answer:
@Test public void createsNoSingleNodeForMultipleLayers() throws Exception { addNodesToLayer(layer, 1); ILayer nextLayer = mock(ILayer.class); addNodesToLayer(nextLayer, 1); assertThat(factory.create(layer, nextLayer).isSingleNode(), is(false)); }
@Test public void createsNoSingleNodeForMultipleNodes() throws Exception { addNodesToLayer(layer, 2); assertThat(factory.create(layer).isSingleNode(), is(false)); }
@Test public void createsSingleNode() throws Exception { addNodesToLayer(layer, 1); assertThat(factory.create(layer).isSingleNode(), is(true)); }