@Test
public void idempotentClose() throws IOException {

    OutputStream out = mock(OutputStream.class);
    BdioWriter writer = new BdioWriter(metadata, new BdioFile(out));
    writer.close();
    writer.close();
    verify(out, times(1)).close();
}