@Override
  public <M extends Message> StreamWriter<M> newStreamWriter(DumpElement<M> elt) {
    checkNotPublished();
    File file = new File(rootDir, elt.filename());
    return StreamWriterImpl.create(file);
  }
@Test
  public void create_empty_file_if_stream_is_empty() {
    try (StreamWriter<ProjectDump.Component> writer = underTest.newStreamWriter(COMPONENTS)) {
      // no components
    }
    assertThat(new File(rootDir, COMPONENTS.filename())).isFile().exists();
    try (MessageStream<ProjectDump.Component> reader = dumpReader.stream(COMPONENTS)) {
      assertThat(reader).isEmpty();
    }
  }