public static Write write() {
    return new AutoValue_PulsarIO_Write.Builder().build();
  }
@Test
  public void testWriteFromTopic() {
    try {
      PulsarIO.Write writer =
          PulsarIO.write().withClientUrl(pulsarContainer.getPulsarBrokerUrl()).withTopic(TOPIC);
      int numberOfMessages = 100;
      List<byte[]> messages = new ArrayList<>();
      for (int i = 0; i < numberOfMessages; i++) {
        messages.add(("PULSAR_WRITER_TEST_" + i).getBytes(StandardCharsets.UTF_8));
      }
      testPipeline.apply(Create.of(messages)).apply(writer);

      testPipeline.run();

      List<Message<byte[]>> receiveMsgs = receiveMessages();
      assertEquals(numberOfMessages, receiveMessages().size());
      for (int i = 0; i < numberOfMessages; i++) {
        assertTrue(
            new String(receiveMsgs.get(i).getValue(), StandardCharsets.UTF_8)
                .equals("PULSAR_WRITER_TEST_" + i));
      }
    } catch (Exception e) {
      LOG.error(e.getMessage());
    }
  }