void () { Path enumPath = myTempDirectory.newDirectoryPath().resolve("test.enum"); SimpleStringPersistentEnumerator enumerator = new SimpleStringPersistentEnumerator(enumPath); int id1 = enumerator.enumerate("qwe"); int id2 = enumerator.enumerate("asd"); int id3 = enumerator.enumerate("qwe"); assertEquals(1, id1); assertEquals(2, id2); assertEquals(1, id3); }