public void doVoidMethodDelegationCheck() {
        if (mockConsumer == null || wrapperConsumer == null ||
            mockConfigurationFunction != null || wrapperFunctionApplier != null ||
            mockFunctionReturnValue != null || mockFunctionReturnValueTransformation != null) {
            throwExceptionForIllegalTestSetup();
        }
        // configure the mock to behave as desired
        mockConsumer.accept(Mockito.doAnswer(invocation -> {
            persistentCollectionMethodInvokedCorrectly = true;
            return null;
        }).when(mock));
        // invoke the wrapper, which should invoke the mock as desired
        wrapperConsumer.accept(wrapper);
        // assert that the expected delegation to the mock actually occurred
        assertTrue(persistentCollectionMethodInvokedCorrectly);
    }
@param wrapper the wrapper
@return the underlying delegate for the given wrapper
server-common/src/test/java/org/apache/kafka/server/immutable/DelegationChecker.java