mdedetrich opened a new pull request, #12781: URL: https://github.com/apache/kafka/pull/12781
Migrates the tests from EasyMock to Mockito. Notes about non trivial changes below * Originally the test was using `PowerMock.expectPrivate` to mock protected fields. There is no equivalent for mockito so instead we just subclassed `KafkaBasedLog` with `MockedKafkaBasedLog` and override the fields to be returned. * The test was using `Whitebox.<Thread>getInternalState(store, "thread")` to access an internal private `thread` field. Similarly mockito has no such method so instead I resorted to using `FieldUtils` from Apache commons whos implementation was abstracted away into a `getStorePrivateThread()` method. I had to also add an exclusion rule to `checkstyle/import-control.xml` for this new import. * Some tests had a `throw Exception` even though they never threw an exception so this was removed. -- 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