IRequestCycle cycle = (IRequestCycle) cycleControl.getMock();
    public void testAddNewGateway() {        Gateway g = new Gateway();        g.setUniqueId();        MockControl contextControl = MockControl.createStrictControl(GatewayContext.class);        contextControl.setDefaultMatcher(MockControl.EQUALS_MATCHER);        GatewayContext context = (GatewayContext) contextControl.getMock();        context.storeGateway(g);        contextControl.replay();        m_editGatewayPage.setGatewayContext(context);        m_editGatewayPage.setGateway(g);        MockControl cycleControl = MockControl.createStrictControl(IRequestCycle.class);        m_editGatewayPage.setNextPage(ListGateways.PAGE);        IRequestCycle cycle = (IRequestCycle) cycleControl.getMock();                cycleControl.replay();        m_editGatewayPage.saveValid(cycle);        cycleControl.verify();        contextControl.verify();    }