### Question:
NameIndex implements Storable<NameIndex> { @Override public NameIndex create(long initBytes) { names.create(initBytes); return this; } NameIndex(Directory dir); @Override NameIndex create(long initBytes); @Override boolean loadExisting(); long put(String name); String get(long pointer); @Override void flush(); @Override void close(); @Override boolean isClosed(); void setSegmentSize(int segments); @Override long getCapacity(); void copyTo(NameIndex nameIndex);  }### Answer:
@Test public void testCreate() { NameIndex index = new NameIndex(new RAMDirectory()).create(1000); String str1 = "nice"; long pointer1 = index.put(str1); String str2 = "nice work äöß"; long pointer2 = index.put(str2); assertEquals(str2, index.get(pointer2)); assertEquals(str1, index.get(pointer1)); index.close(); }