@Test
    public void shouldEnsureNonNullRequestReceivedByHandlers() {
        policies.add(pwcOne);

        requestChain = new RequestChain(policies, mockContext);

        requestChain.bodyHandler(mockBodyHandler);
        requestChain.endHandler(mockEndHandler);

        requestChain.doApply(mockRequest);
        requestChain.write(mockBuffer);
        requestChain.end();

        verify(mockBodyHandler, times(1)).handle(mockBuffer);
        verify(mockEndHandler, times(1)).handle((Void) null);

        // At this point we must ensure that the request and responses are NOT null.
        verify(policyOne).getRequestDataHandler(mockRequest, mockContext, configuration);
    }
Test {@link RequestChain} and {@link ResponseChain} functionality.

@author Marc Savy <msavy@redhat.com>
gateway/engine/core/src/test/java/io/apiman/gateway/engine/impl/DataPolicyChainTest.java