VisualisationGraph implements Serializable { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof VisualisationGraph)) return false; VisualisationGraph graph = (VisualisationGraph) o; return Arrays.equals(getNodes(), graph.getNodes()) && Arrays.equals(getEdges(), graph.getEdges()); }  VisualisationNode addNode(String uri); VisualisationNode addNode(String uri, String ip); VisualisationEdge addEdge(String fromURI, String toURI); void optimizeArrays(); @Deprecated byte[] convertToByteStream(); VisualisationNode[] getNodes(); VisualisationNode getNode(String uri); VisualisationEdge[] getEdges(); VisualisationEdge[] getEdges(VisualisationNode node); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void equals() { VisualisationGraph graph1 = new VisualisationGraph(); VisualisationGraph graph2 = new VisualisationGraph(); assertTrue("2 fresh visualization (empty) graphs should be equal", graph1.equals(graph2)); graph1.addNode("https: graph1.addEdge("https: graph2.addEdge("https: assertTrue("Adding a node pair (even over different circumstances should not de-equals the graphs!", graph1.equals(graph2)); graph1.optimizeArrays(); assertFalse("Nut optimazing the Arrays aof only one Graph should result in a nom equal result", graph1.equals(graph2)); graph2.optimizeArrays(); ; graph1.addNode("https: graph2.addNode("https: assertTrue("Final test with extend the arrays: new node", graph1.equals(graph2)); }