title: How to test a ConsumerAwareRebalanceListener?
body: <p>I developed a <code>@KafkaListener</code> that is also marked with the <code>ConsumerAwareRebalanceListener</code> interface, using Spring Boot 2.0.6. I implemented the <code>onPartitionsAssigned</code> method, in which I rewind the offset of a fixed amount of time, let's say 60 seconds.</p>
  
  <p>So far so good. </p>
  
  <p>How can I test the above use case using the tools that Spring Kafka gives me? I supposed I need to start a Kafka broker (i.e., an <code>EmbeddedKafka</code>), then stopping the listener and then rebooting it again, to test that it read again the messages arrived in the last 60 seconds.</p>
  
  <p>Can somebody help me? I googled a little, but I didn't find anything.
  Thanks a lot.</p>