### Question:
LoggingInvocationHandler implements InvocationHandler { @Nonnull public static <T> T proxying (@Nonnull final Class <? extends T> aInterfaceClass, @Nonnull final T aActualTarget) { return proxying (aInterfaceClass, aActualTarget, LoggingInvocationHandler::new); } LoggingInvocationHandler(@Nonnull final Object aActualTarget); boolean isProxyReturnValues(); @Nonnull LoggingInvocationHandler setProxyReturnValues(final boolean bProxyReturnValues); @Nullable Object invoke(@Nonnull final Object aProxy, @Nonnull final Method aMethod, @Nonnull final Object [] aArgs); @Nonnull static T proxying(@Nonnull final Class <? extends T> aInterfaceClass, @Nonnull final T aActualTarget); @Nonnull static T proxying(@Nonnull final Class <? extends T> aInterfaceClass,
                                @Nonnull final T aActualTarget,
                                @Nonnull final Function <? super T, ? extends InvocationHandler> aFactory); static final boolean DEFAULT_PROXY_RETURN_VALUES; }### Answer:
@Test @SuppressFBWarnings ("RV_RETURN_VALUE_IGNORED") public void testBasic () { final ICommonsList <String> aList = LoggingInvocationHandler.proxying (ICommonsList.class, new CommonsArrayList <> ()); aList.add ("a"); aList.add ("b"); aList.subList (0, 1).isEmpty (); aList.remove (0).length (); }
@Test @SuppressFBWarnings ("RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT") public void testDefaultMethod () { LoggingInvocationHandler.proxying (ITest.class, new TestImpl ()).foo (); LoggingInvocationHandler.proxying (ITest.class, new TestImpl2 ()).foo (); }