Run the demonstration.
SomeClass proxy = SomeClassFactory.getDynamicSomeClassProxy();
proxy.someMethod();
proxy.someOtherMethod("Our Proxy works!");
InvocationHandler handler = Proxy.getInvocationHandler(proxy);
if (handler instanceof MethodCountingHandler) {
System.out.println(((MethodCountingHandler)handler).getInvocationCount());
}