RxViper { static <R extends Router> R createRouter(R router, Class<? extends ViperPresenter> actualClass) { return createProxy(router, ViperPresenter.class, actualClass, 1); } private  RxViper();   }
@Test public void shouldCreateProxyRouter() { class TestRouterImpl implements TestRouter {} final TestRouter router = new TestRouterImpl(); final TestRouter proxyRouter = RxViper.createRouter(router, TestViperPresenter.class); assertThat(Proxy.isProxyClass(proxyRouter.getClass())).isTrue(); final InvocationHandler handler = Proxy.getInvocationHandler(proxyRouter); assertThat(handler).isInstanceOf(NullObject.class); assertThat(((NullObject) handler).get()).isSameAs(router); }