@Test
public void virtualNode() throws ReportException {

    Map<Object, Object> properties = MapBuilder.builder().entry("key", "value").build();
    Map<String, Object> virtualNode = MapBuilder.<String, Object> builder() //
            .entry("role", "node") //
            .entry("label", "Virtual Node") //
            .entry("labels", singletonList("Test")) //
            .entry("properties", properties) //
            .build();
    MapBuilder<String, Object> builder = MapBuilder.builder();
    builder.entry("nodes", singletonList(virtualNode));
    Result<ExecutableRule> result = Result.builder().rows(singletonList(builder.build())).build();
    SubGraph graph = factory.createSubGraph(result);
    Map<Long, Node> nodes = graph.getNodes();
    assertThat(nodes.size()).isEqualTo(1);
    Node node = nodes.get(-1l);
    assertThat(node).isNotNull();
    assertThat(node.getId()).isEqualTo(-1l);
    assertThat(node.getLabel()).isEqualTo("Virtual Node");
    assertThat(node.getLabels()).containsExactly("Test");
    assertThat(node.getProperties()).isEqualTo(properties);
}