MockControl pagec = newControl(IPage.class);
IPage page = (IPage) pagec.getMock();
MockControl componentc = newControl(IDirect.class);
IDirect component = (IDirect) componentc.getMock();
component.getPage();
componentc.setReturnValue(page);
page.getPageName();
pagec.setReturnValue("Barney");
component.getIdPath();
componentc.setReturnValue("foo.bar");
replayControls();
DirectCallback callback = new DirectCallback(component, params);
assertEquals("DirectCallback[Barney/foo.bar p1, p2]", callback.toString());
verifyControls();
IRequestCycle cycle = newCycle("Barney", page);
page.getNestedComponent("foo.bar");
pagec.setReturnValue(component);
cycle.setListenerParameters(params);
component.trigger(cycle);
replayControls();
callback.performCallback(cycle);