### Question:
CacheStorageWriter { void writeLocalConfig( DescriptorDigest imageId, ContainerConfigurationTemplate containerConfiguration) throws IOException { Path configDirectory = cacheStorageFiles.getLocalDirectory().resolve("config"); Files.createDirectories(configDirectory); writeJsonTemplate(containerConfiguration, configDirectory.resolve(imageId.getHash())); } CacheStorageWriter(CacheStorageFiles cacheStorageFiles);   }### Answer:
@Test public void testWriteLocalConfig() throws IOException, URISyntaxException, DigestException { ContainerConfigurationTemplate containerConfigurationTemplate = loadJsonResource("core/json/containerconfig.json", ContainerConfigurationTemplate.class); cacheStorageWriter.writeLocalConfig( DescriptorDigest.fromHash( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), containerConfigurationTemplate); Path savedConfigPath = cacheStorageFiles .getLocalDirectory() .resolve("config") .resolve("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); Assert.assertTrue(Files.exists(savedConfigPath)); ContainerConfigurationTemplate savedContainerConfig = JsonTemplateMapper.readJsonFromFile(savedConfigPath, ContainerConfigurationTemplate.class); Assert.assertEquals("wasm", savedContainerConfig.getArchitecture()); }