@Override
    public boolean retainAll(Collection<?> c) {
        // will throw UnsupportedOperationException; delegate anyway for testability
        return underlying().retainAll(c);
    }
@Test
    public void testDelegationOfUnsupportedFunctionRetainAll() {
        new PCollectionsHashSetWrapperDelegationChecker<>()
            .defineMockConfigurationForUnsupportedFunction(mock -> mock.retainAll(eq(Collections.emptyList())))
            .defineWrapperUnsupportedFunctionInvocation(wrapper -> wrapper.retainAll(Collections.emptyList()))
            .doUnsupportedFunctionDelegationCheck();
    }