@Test
    void testGetConfigAndCaching() {
        ConfigTester tester = new ConfigTester();
        MemoryCache memoryCache = proxy.memoryCache();
        assertEquals(0, memoryCache.size());
        RawConfig res = proxy.resolveConfig(tester.createRequest(fooConfig)).orElseThrow();
        assertEquals(ConfigTester.fooPayload.toString(), res.getPayload().toString());
        assertEquals(1, memoryCache.size());
        assertEquals(res, memoryCache.get(new ConfigCacheKey(fooConfig.getKey(), fooConfig.getDefMd5())).orElseThrow());

        // Trying same config again
        JRTServerConfigRequest newRequestBasedOnResponse = tester.createRequest(res);
        RawConfig res2 = proxy.resolveConfig(newRequestBasedOnResponse).orElseThrow();
        assertFalse(ProxyServer.configOrGenerationHasChanged(res2, newRequestBasedOnResponse));
        assertEquals(1, memoryCache.size());
    }
Verifies that config is retrieved from the real server when it is not found in the cache,
that the cache is populated with the config and that the entry in the cache is used
when it is found there.
config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ProxyServerTest.java