}
public void setUp( String username, Map<String,String> initParams ) throws Exception {
ServiceRegistry mockServiceRegistry = EasyMock.createNiceMock( ServiceRegistry.class );
EasyMock.expect( mockServiceRegistry.lookupServiceURL( "test-cluster", "NAMENODE" ) ).andReturn( "test-nn-scheme://test-nn-host:411" ).anyTimes();
EasyMock.expect( mockServiceRegistry.lookupServiceURL( "test-cluster", "JOBTRACKER" ) ).andReturn( "test-jt-scheme://test-jt-host:511" ).anyTimes();
GatewayServices mockGatewayServices = EasyMock.createNiceMock( GatewayServices.class );
EasyMock.expect( mockGatewayServices.getService( GatewayServices.SERVICE_REGISTRY_SERVICE ) ).andReturn( mockServiceRegistry ).anyTimes();
EasyMock.replay( mockServiceRegistry, mockGatewayServices );