@Test
public void testPut()
{

    NameIndex index = new NameIndex(new RAMDirectory()).create(1000);
    long result = index.put("Something Streetä");
    assertEquals("Something Streetä", index.get(result));
    long existing = index.put("Something Streetä");
    assertEquals(result, existing);
    result = index.put("testing");
    assertEquals("testing", index.get(result));
    assertEquals(0, index.put(""));
    assertEquals(0, index.put(null));
    assertEquals("", index.get(0));
    index.close();
}