@Test
    public void testParseConfiguration() {
        CachingPolicy policy = new CachingPolicy();

        // Empty config test
        String config = "{}";
        Object parsed = policy.parseConfiguration(config);
        Assert.assertNotNull(parsed);
        Assert.assertEquals(CachingConfig.class, parsed.getClass());
        CachingConfig parsedConfig = (CachingConfig) parsed;
        Assert.assertEquals(0, parsedConfig.getTtl());

        // Sample real config
        config = "{\n" +
                "  \"ttl\" : 12345\n" +
                "}";

        parsed = policy.parseConfiguration(config);
        parsedConfig = (CachingConfig) parsed;
        Assert.assertEquals(12345L, parsedConfig.getTtl());
    }
Test method for {@link io.apiman.gateway.engine.policies.CachingPolicy#parseConfiguration(java.lang.String)}.
gateway/engine/policies/src/test/java/io/apiman/gateway/engine/policies/CachingPolicyConfigTest.java