EasyMock.expect( decEnvironment.getAttribute( GatewayServices.GATEWAY_SERVICES_ATTRIBUTE ) ).andReturn( gatewayServices ).anyTimes();
EasyMock.expect( decEnvironment.getAttribute( GatewayServices.GATEWAY_CLUSTER_ATTRIBUTE ) ).andReturn( clusterName ).anyTimes();
UrlRewriteContext decContext = EasyMock.createNiceMock( UrlRewriteContext.class );
EncryptStepContextParams encryptedParams = new EncryptStepContextParams();
encryptedParams.addParam( decParam, Arrays.asList( encryptedAdrress ) ); //Value was encrypted by EncryptUriProcessor
encryptedParams.addParam( "foo1", Arrays.asList( "test" ) );
EasyMock.expect( decContext.getParameters() ).andReturn( encryptedParams );
Capture<EncryptStepContextParams> decodedValue = new Capture<EncryptStepContextParams>();
decContext.addParameters( EasyMock.capture( decodedValue ) );