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

        requestChain = new RequestChain(policies, mockContext);

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

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

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

        InOrder order = inOrder(policyOne, policyTwo);
        order.verify(policyOne).apply(mockRequest, mockContext, pwcOne.getConfiguration(), requestChain);
        order.verify(policyTwo).apply(mockRequest, mockContext, pwcTwo.getConfiguration(), requestChain);
    }
Test {@link RequestChain} and {@link ResponseChain} functionality.

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