private void initProducer(String bootstrapServer) {
      producer = TestUtils.createProducer(
          bootstrapServer,
          1,
          60 * 1000L,
          1024L * 1024L,
          0,
          30 * 1000,
          0,
          16384,
          "none",
          20 * 1000,
          SecurityProtocol.PLAINTEXT,
          null,
          Option$.MODULE$.<Properties>apply(new Properties()),
          new StringSerializer(),
          new ByteArraySerializer());
    }
A wrapper class to consolidate all the components required to be either mocked or stubbed prior to unit testing
the stream processor.
samza-test/src/test/java/org/apache/samza/test/processor/TestStreamProcessor.java