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

        responseChain = new ResponseChain(policies, mockContext);

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

        responseChain.doApply(mockResponse);
        responseChain.write(mockBuffer);
        responseChain.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).getResponseDataHandler(mockResponse, 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