### Question:
CacheStorageReader { Optional<ContainerConfigurationTemplate> retrieveLocalConfig(DescriptorDigest imageId) throws IOException { Path configPath = cacheStorageFiles.getLocalDirectory().resolve("config").resolve(imageId.getHash()); if (!Files.exists(configPath)) { return Optional.empty(); } ContainerConfigurationTemplate config = JsonTemplateMapper.readJsonFromFile(configPath, ContainerConfigurationTemplate.class); return Optional.of(config); } CacheStorageReader(CacheStorageFiles cacheStorageFiles);   }### Answer:
@Test public void testRetrieveLocalConfig() throws IOException, URISyntaxException, DigestException { Path configDirectory = cacheDirectory.resolve("local").resolve("config"); Files.createDirectories(configDirectory); Files.copy( Paths.get(Resources.getResource("core/json/containerconfig.json").toURI()), configDirectory.resolve( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")); ContainerConfigurationTemplate configurationTemplate = cacheStorageReader .retrieveLocalConfig( DescriptorDigest.fromHash( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")) .get(); Assert.assertEquals("wasm", configurationTemplate.getArchitecture()); Assert.assertEquals("js", configurationTemplate.getOs()); Optional<ContainerConfigurationTemplate> missingConfigurationTemplate = cacheStorageReader.retrieveLocalConfig( DescriptorDigest.fromHash( "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb")); Assert.assertFalse(missingConfigurationTemplate.isPresent()); }