@Before
    public void setup() {
        Policy policyBean = mock(Policy.class);
        given(policyBean.getPolicyImpl()).willReturn(PassthroughPolicy.QUALIFIED_NAME);
        given(policyBean.getPolicyJsonConfig()).willReturn("{}");

        mockBufferInbound = mock(IApimanBuffer.class);
        given(mockBufferInbound.toString()).willReturn("stottie");

        mockBufferOutbound = mock(IApimanBuffer.class);
        given(mockBufferOutbound.toString()).willReturn("bacon");

        policyList = new ArrayList<>();
        policyList.add(policyBean);

        mockBodyHandler = mock(IAsyncHandler.class);
        mockEndHandler = mock(IAsyncHandler.class);
    }
Unit test for the default engine factory.
gateway/engine/core/src/test/java/io/apiman/gateway/engine/impl/DefaultEngineFactoryTest.java