// Intentionally add a dummy NotToBeInvokedInterceptor to check whether the IsLocalProxyFactoryInterceptor
// passes the call to the next interceptor. If it's passed then it indicates that the call was (incorrectly) considered
// remote
Interceptor[] interceptors =
{IsLocalProxyFactoryInterceptor.singleton, new NotToBeInvokedInterceptor()};
PojiProxy handler = new PojiProxy(KEY, null, interceptors);
Class<?>[] interfaces = new Class<?>[]
{Calculator.class};
// create the proxy
Calculator calculator = (Calculator) Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfaces, handler);