@Override
            public void handle(IAsyncResult<IEngineResult> result) {
                if (result.isError()) {
                    errorHolder.add(result.getError());
                } else {
                    IEngineResult engineResult = result.getResult();
                    if (engineResult.isFailure()) {
                        failureHolder.add(engineResult.getPolicyFailure());
                    } else {
                        responseHolder.add(engineResult.getApiResponse());
                        engineResult.bodyHandler(new IAsyncHandler<IApimanBuffer>() {
                            @Override
                            public void handle(IApimanBuffer result) {
                                responseBody.append(new String(result.getBytes()));
                            }
                        });
                        engineResult.endHandler(new IAsyncHandler<Void>() {
                            @Override
                            public void handle(Void result) {
                            }
                        });
                    }
                }
            }
Base class for all apiman policy tests.

@author eric.wittmann@redhat.com
test/policies/src/main/java/io/apiman/test/policies/ApimanPolicyTest.java