public static <MSG extends Message> CloseableIterator<MSG> readStream(File file, Parser<MSG> parser) {
    try {
      // the input stream is closed by the CloseableIterator
      BufferedInputStream input = new BufferedInputStream(new FileInputStream(file));
      return readStream(input, parser);
    } catch (Exception e) {
      throw ContextException.of("Unable to read messages", e).addContext("file", file);
    }
  }
@Test
  public void read_empty_stream() throws Exception {
    File file = temp.newFile();
    CloseableIterator<Fake> it = Protobuf.readStream(file, Fake.parser());
    assertThat(it).isNotNull();
    assertThat(it.hasNext()).isFalse();
  }