@Test @Transactional public void shouldExecuteCallback() throws Exception { Long refNodeId = neo4jTemplate.exec( new GraphCallback<Long>() { @Override public Long doWithGraph(GraphDatabase graph) throws Exception { return graph.getReferenceNode().getId(); } }); assertEquals(referenceNode.getId(), (long) refNodeId); }
@Test @Transactional public void testGetNode() throws Exception { Node lookedUpNode = neo4jTemplate.getNode(referenceNode.getId()); assertEquals(referenceNode, lookedUpNode); }