public static Read<String> read() {
    return new AutoValue_MongoDbGridFSIO_Read.Builder<String>()
        .setParser(TEXT_PARSER)
        .setCoder(StringUtf8Coder.of())
        .setConnectionConfiguration(ConnectionConfiguration.create())
        .setSkew(Duration.ZERO)
        .build();
  }
@Test
  public void testFullRead() {
    PCollection<String> output =
        pipeline.apply(
            MongoDbGridFSIO.read().withUri("mongodb://localhost:" + port).withDatabase(DATABASE));

    PAssert.thatSingleton(output.apply("Count All", Count.globally())).isEqualTo(5000L);

    PAssert.that(output.apply("Count PerElement", Count.perElement()))
        .satisfies(
            input -> {
              for (KV<String, Long> element : input) {
                assertEquals(500L, element.getValue().longValue());
              }
              return null;
            });

    pipeline.run();
  }