@@ -0,0 +1,1873 @@
+package ee.shy.map;%0A%0Aimport ee.shy.TemporaryDirectory;%0Aimport ee.shy.io.Json;%0Aimport ee.shy.io.TestJsonable;%0Aimport org.junit.Before;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0A%0Aimport java.io.InputStream;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0Aimport java.util.Arrays;%0Aimport java.util.HashSet;%0A%0Aimport static org.junit.Assert.*;%0A%0Apublic class DirectoryJsonMapTest %7B%0A    @Rule%0A    public final TemporaryDirectory temporaryDirectory = new TemporaryDirectory();%0A%0A    private Path directory;%0A    private DirectoryJsonMap%3CTestJsonable%3E jsonMap;%0A    private TestJsonable testJsonable;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        directory = temporaryDirectory.newDirectory();%0A        jsonMap = new DirectoryJsonMap%3C%3E(TestJsonable.class, directory);%0A        testJsonable = TestJsonable.newRandom();%0A    %7D%0A%0A    @Test%0A    public void testPut() throws Exception %7B%0A        jsonMap.put(%22foo%22, testJsonable);%0A%0A        Path path = directory.resolve(%22foo%22);%0A        try (InputStream is = Files.newInputStream(path)) %7B%0A            TestJsonable readJsonable = Json.read(is, TestJsonable.class);%0A            assertEquals(testJsonable, readJsonable);%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void testRetrieve() throws Exception %7B%0A        jsonMap.put(%22foo%22, testJsonable);%0A%0A        assertEquals(testJsonable, jsonMap.get(%22foo%22));%0A        assertNull(jsonMap.get(%22bar%22));%0A    %7D%0A%0A    @Test%0A    public void testRemove() throws Exception %7B%0A        jsonMap.put(%22foo%22, testJsonable);%0A        jsonMap.remove(%22foo%22);%0A%0A        assertFalse(Files.exists(directory.resolve(%22foo%22)));%0A    %7D%0A%0A    @Test%0A    public void testKeySet() throws Exception %7B%0A        HashSet%3CString%3E keySet = new HashSet%3C%3E(Arrays.asList(%22foo%22, %22bar%22, %22baz%22));%0A%0A        for (String key : keySet)%0A            jsonMap.put(key, testJsonable);%0A%0A        assertEquals(keySet, jsonMap.keySet());%0A    %7D%0A%7D

Add tests for DirectoryJsonMap