@Override
                public void evaluate() throws Throwable {
                    String[] expectedPayloads = ((PublishPayloadTestInfo) testInfo).expectedPayloads;
                    int index = 0;
                    for (String expectedPayload : expectedPayloads) {
                        if (MockGatewayServlet.getPayloads().isEmpty()) {
                            Assert.fail("Expected a payload but did not find one.");
                        }
                        String actualPayload = MockGatewayServlet.getPayloads().get(index);
                        if (expectedPayload == null || "".equals(expectedPayload)) {
                            Assert.assertNull(actualPayload);
                        } else {
                            ObjectMapper mapper = new ObjectMapper();
                            JsonNode expected = mapper.readTree(expectedPayload);
                            JsonNode actual = mapper.readTree(actualPayload.trim());
                            JsonCompare jsonCompare = new JsonCompare();
                            jsonCompare.assertJson(expected, actual);
                        }

                        index++;
                    }
                }
@see org.junit.runners.ParentRunner#runChild(java.lang.Object, org.junit.runner.notification.RunNotifier)
manager/test/api/src/main/java/io/apiman/manager/test/junit/ManagerRestTester.java