@Test
public void readMetadata() throws Exception {

    ZonedDateTime creationDateTime = ZonedDateTime.now(ZoneId.systemDefault());
    BdioMetadata metadata = BdioMetadata.createRandomUUID().creationDateTime(creationDateTime);
    InputStream inputStream = BdioTest.zipJsonBytes(metadata.asNamedGraph());
    graph.io(testBdio(TT.Metadata, TT.id)).readGraph(inputStream, null, null);
    GraphTraversal<Vertex, Vertex> namedGraphs = graph.traversal().V().hasLabel(TT.Metadata);
    assertThat(namedGraphs.hasNext()).isTrue();
    Vertex namedGraph = namedGraphs.next();
    assertThat(namedGraphs.hasNext()).isFalse();
    VertexProperty<String> idProperty = namedGraph.property(TT.id);
    assertThat(idProperty.isPresent()).isTrue();
    assertThat(idProperty.value()).isEqualTo(metadata.id());
    VertexProperty<ZonedDateTime> creationProperty = namedGraph.property(Bdio.DataProperty.creationDateTime.name());
    assertThat(creationProperty.isPresent()).isTrue();
    assertThat(creationProperty.value()).isEqualTo(creationDateTime);
}