@Test
public void compositeObject() throws ReportException {

    CompositeObject compositeObject = mock(CompositeObject.class);
    Neo4jNode neo4jNode = getNeo4jNode(1l, "Test");
    doReturn(neo4jNode).when(compositeObject).getDelegate();
    MapBuilder<String, Object> builder = MapBuilder.builder();
    builder.entry("nodes", singletonList(compositeObject));
    Result<ExecutableRule> result = Result.builder().rows(singletonList(builder.build())).build();
    SubGraph graph = factory.createSubGraph(result);
    Map<Long, Node> nodes = graph.getNodes();
    assertThat(nodes).isNotEmpty();
    Node node = nodes.get(1l);
    assertThat(node).isNotNull();
    assertThat(node.getId()).isEqualTo(1l);
    assertThat(node.getLabels()).containsExactly("Test");
}