assertEquals(6,proxy2.doSomething());
}
private InterfaceForProxy createProxy() {
ProxiedClass proxyClass = new ProxiedClass(2);
assertEquals(2,proxyClass.doSomething());
Class proxyClazz = Proxy.getProxyClass(Thread.currentThread().getContextClassLoader(),new Class[]{InterfaceForProxy.class});
System.out.println(proxyClazz);
InterfaceForProxy proxy = (InterfaceForProxy) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),new Class[]{InterfaceForProxy.class},new TestHandler(3,proxyClass));