jlprat commented on a change in pull request #10651: URL: https://github.com/apache/kafka/pull/10651#discussion_r636993622
########## File path: docs/streams/developer-guide/testing.html ########## @@ -275,21 +275,21 @@ <h2> <b>Construction</b> <p> To begin with, instantiate your processor and initialize it with the mock context: - <pre class="line-numbers"><code class="language-text">final Processor processorUnderTest = ...; + <pre class="line-numbers"><code class="language-java">final Processor processorUnderTest = ...; final MockProcessorContext context = new MockProcessorContext(); processorUnderTest.init(context);</code></pre> If you need to pass configuration to your processor or set the default serdes, you can create the mock with config: - <pre class="line-numbers"><code class="language-text">final Properties props = new Properties(); + <pre class="line-numbers"><code class="language-java">final Properties props = new Properties(); props.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.String().getClass()); props.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.Long().getClass()); -props.put("some.other.config", "some config value"); +props.put("some.other.config", "some config value"); final MockProcessorContext context = new MockProcessorContext(props);</code></pre> </p> <b>Captured data</b> <p> The mock will capture any values that your processor forwards. You can make assertions on them: - <pre class="line-numbers"><code class="language-text">processorUnderTest.process("key", "value"); + <pre class="line-numbers"><code class="language-java">processorUnderTest.process("key", "value"); Review comment: Done! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org