package chapter11.seven; import org.junit.Test; public class SimpleProxyDemo{ public static void consumer(Interface iface) { iface.doSomething(); iface.somethingElse("bonobo"); } @Test public static void main(String[] args) { consumer(new RealObject()); consumer(new SimpleProxy(new RealObject())); } }