@Test
public void writeMissingMetadata() throws Exception {

    graph.addVertex(
            T.label, Bdio.Class.Project.name(),
            TT.id, BdioObject.randomId());
    commit();
    HeapOutputStream outputStream = new HeapOutputStream();
    graph.io(testBdio(TT.Metadata, TT.id)).writeGraph(new BdioFile(outputStream));
    List<String> entries = BdioTest.zipEntries(outputStream.getInputStream());
    assertThat(entries).hasSize(2);
    assertThatJson(entries.get(0)).arrayAt("/@graph").hasSize(0);
    assertThatJson(entries.get(1)).arrayAt("/@graph").hasSize(1);
    assertThatJson(entries.get(1)).arrayAt("/@graph/0/@type").containsExactly(Bdio.Class.Project.toString());
}