divijvaidya commented on PR #11792: URL: https://github.com/apache/kafka/pull/11792#issuecomment-1258336831
@C0urante I won't be able to pick this up until 16th Oct. If no one has picked this up my then, I would happily pick it up. A problem that is common amongst the tests that I am migrating (`WorkerSinkTaskTest` and `WorkerSinkTaskThreadedTest`) and this PR is the FIFO queue stubbing not available in `Mockito` as @jeff303 [mentioned earlier](https://github.com/apache/kafka/pull/11792#issuecomment-1078447241). The approach that I have taken up to resolve that is to use `OngoingStubbing<T>` and chaining the expectations on that. We can also do that for `void` method using: ``` doNothing().doThrow(exception).doNothing().when(mockedObject).methodThatReturnsVoid() ``` Does anyone else have a better solution to this? In my scenario, I want to queue expectations for `consumer.poll` and `consumer.assignment()` methods. -- 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. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org