void () { final CovariantFromBaseClassTest.Impl proxy = AdvancedProxy.createProxy(CovariantFromBaseClassTest.Impl.class, ArrayUtil.EMPTY_CLASS_ARRAY, new InvocationHandler() { @Override public Object invoke(Object proxy, Method method, Object[] args) { return "a"; } }, false, ArrayUtilRt.EMPTY_OBJECT_ARRAY); assertEquals("a", proxy.sayA()); assertEquals("a", ((CovariantFromBaseClassTest.Base)proxy).sayA()); assertEquals("a", ((CovariantFromBaseClassTest.Intf)proxy).sayA()); }