### Question:
JavaSystem extends SimpleSystemImpl { @Override public SimpleNode moveTo(String nodeQuery, String... keys) { SimpleNode javaSourceNode=new JavaSourceNode(this,nodeQuery,keys); optionalStartNode(javaSourceNode); return javaSourceNode; }  @Override SimpleSystem connect(String... connectionParams); @Override SimpleNode moveTo(String nodeQuery, String... keys); @Override Class<? extends SimpleNode> getNodeClass();  }### Answer:
@Test public void testJavaSystem() { JavaSystem js = new JavaSystem(); JavaSourceNode jsn = (JavaSourceNode) js.moveTo( "../simplegraph-java/src/test/java/com/bitplan/simplegraph/java/TestJavaSystem.java"); debug = true; if (debug) { js.forAll(SimpleNode.printDebug); CompilationUnit cu = jsn.compilationUnit; cu.walk(node -> { System.out.println(node.getClass().getName()); }); } MethodDeclaration md = (MethodDeclaration) js.g().V() .hasLabel("MethodDeclaration").has("name", "testJavaSystem").next() .property("node").value(); assertTrue(md.getComment().isPresent()); assertTrue(md.getComment().get().getContent() .contains("test for the Java System")); }
@Test public void testClasses() { JavaSystem js = new JavaSystem(); JavaSourceNode jsn = (JavaSourceNode) js.moveTo( "../simplegraph-java/src/test/java/com/bitplan/simplegraph/java/TestJavaSystem.java"); List<Vertex> cdNodes=js.g().V() .hasLabel("ClassOrInterfaceDeclaration").toList(); assertEquals(2,cdNodes.size()); for (Vertex cdNode:cdNodes) { SimpleNode.printDebug.accept(cdNode); } }