CallbackFilter filter = new CallbackFilter() { public int accept(Member member) { return Callbacks.LAZY_LOAD; } }; Callbacks callbacks = new Callbacks(); callbacks.set(Callbacks.LAZY_LOAD, loader);  Object obj = Enhancer.enhance(Object.class, null, callbacks, null, null, filter);
Object obj = Enhancer.enhance(Object.class, loader);
    public void testLazyLoader() {        LazyLoader loader = new LazyLoader() {                public Object loadObject() {                    System.err.println("loading object");                    return "foo";                }            };        CallbackFilter filter = new CallbackFilter() {                public int accept(Member member) {                    return Callbacks.LAZY_LOAD;                }            };        Callbacks callbacks = new Callbacks();        callbacks.set(Callbacks.LAZY_LOAD, loader);        Object obj = Enhancer.enhance(Object.class, null, callbacks, null, null, filter);        assertTrue("foo".equals(obj.toString()));    }