@Override
  public void close() throws IOException {
    writer.markEndOfStream();
    writer.close();
    dlm.close();
  }
@Test
    public void testClose() throws Exception {
        DistributedLogManager dlm = mock(DistributedLogManager.class);
        AppendOnlyStreamWriter writer = mock(AppendOnlyStreamWriter.class);
        DLOutputStream out = new DLOutputStream(dlm, writer);

        out.close();
        verify(writer, times(1)).markEndOfStream();
        verify(writer, times(1)).close();
        verify(dlm, times(1)).close();
    }