### Question:
TripleStoreSystem extends SimpleSystemImpl { @Override public SimpleNode moveTo(String nodeQuery, String... keys) { String[] parts = nodeQuery.split("="); String predicate = parts[0]; String object = parts[1]; Triple triple = query.selectSingle(null, predicate, object); SimpleNode node = new TripleNode(this, triple, keys); return node; } TripleStoreSystem(); @Override SimpleNode moveTo(String nodeQuery, String... keys); @Override SimpleSystem connect(String... params); @Override Class<? extends SimpleNode> getNodeClass();  }### Answer:
@Test public void testReadChildren() throws Exception { SimpleSystem royal92 = readSiDIF(); SimpleNode queenVictoria = royal92.moveTo("id=I1"); if (debug) { queenVictoria.printNameValues(System.out); System.out.println(); } assertEquals("F1", queenVictoria.getMap().get("parentOf")); assertEquals("F42", queenVictoria.getMap().get("childOf")); SimpleStepNode qvf = ((SimpleStepNode) queenVictoria).out("parentOf").findFirst().get(); if (debug) { qvf.printNameValues(System.out); System.out.println(); } assertEquals("1840", qvf.getMap().get("yearMarried")); List<SimpleNode> qvc = qvf.in("childOf") .collect(Collectors.toCollection(ArrayList::new)); if (debug) { qvc.forEach(child -> child.printNameValues(System.out)); System.out.println(String.format("%3d children found", qvc.size())); } assertEquals(9, qvc.size()); }
@Test public void testReadTree() throws Exception { SimpleSystem royal92 = readSiDIF(); SimpleStepNode queenVictoria = (SimpleStepNode) royal92.moveTo("id=I1"); List<SimpleStepNode> descendants2 = children(queenVictoria, 2); if (debug) { descendants2.forEach(d -> d.printNameValues(System.out)); System.out.println( String.format("%3d grandchildren found", descendants2.size())); } assertEquals(49, descendants2.size()); List<SimpleStepNode> descendants7 = children(queenVictoria, 7); if (debug) System.out .println(String.format("%4d descendants found", descendants7.size())); assertEquals(294,descendants7.size()); }