@Test
public void testBuildVertex() {

    // GIVEN
    final String nodeId = "a";
    final Map<String, eu.drus.jpa.unit.neo4j.dataset.graphml.Attribute> nodeAttributes = ImmutableMap.<String, eu.drus.jpa.unit.neo4j.dataset.graphml.Attribute>builder()
            .put("id", new DefaultAttribute<>(1L, AttributeType.LONG)).put("value", new DefaultAttribute<>("foo", AttributeType.STRING))
            .put("labels", new DefaultAttribute<>("A", AttributeType.STRING)).build();
    // WHEN
    final Node node = factory.buildVertex(nodeId, nodeAttributes);
    // THEN
    assertThat(node, notNullValue());
    assertThat(node.getId(), equalTo(nodeId));
    assertThat(node.getLabels(), equalTo(Arrays.asList("A")));
    assertThat(node.getAttributes().size(), equalTo(2));
    final Attribute idAttribute = node.getAttributes().get(0);
    assertThat(idAttribute.getName(), equalTo("id"));
    assertThat(idAttribute.getValue(), equalTo(1l));
    assertThat(idAttribute.isId(), equalTo(Boolean.TRUE));
    final Attribute valueAttribute = node.getAttributes().get(1);
    assertThat(valueAttribute.getName(), equalTo("value"));
    assertThat(valueAttribute.getValue(), equalTo("foo"));
    assertThat(valueAttribute.isId(), equalTo(Boolean.FALSE));
}