@Test
    @Configuration("{" +
            "  \"ttl\" : 5," +
            "  \"cachingResourcesSettingsEntries\" : [{\"statusCode\": \"42\", \"pathPattern\": \".*\", \"httpMethod\": \"*\"}, {\"statusCode\": \"300\", \"pathPattern\": \".*\", \"httpMethod\": \"*\"}]" +
            "}")
    public void testMultipleCachingResourcesSettingsEntries() throws Throwable {
        PolicyTestRequest requestCache = PolicyTestRequest.build(PolicyTestRequestType.GET, "/testStatusCode");
        requestCache.headers().put("X-Echo-ErrorCode", "42");
        requestCache.headers().put("X-Echo-ErrorMessage", "Should cached.");
        assertRequestIsCached(requestCache);

        PolicyTestRequest requestCache2 = PolicyTestRequest.build(PolicyTestRequestType.GET, "/testStatusCode/different");
        requestCache2.headers().put("X-Echo-ErrorCode", "300");
        requestCache2.headers().put("X-Echo-ErrorMessage", "Should cached.");
        assertRequestIsCached(requestCache2);
    }
Verify that requests with specific status code or http method are cached and others not.
@throws Throwable
gateway/engine/policies/src/test/java/io/apiman/gateway/engine/policies/CachingResourcesPolicyTest.java