@Test
public void testDirectoryLayerDirectoryUsingLongs() throws Exception {

    KeySpace root = new KeySpace(
            new DirectoryLayerDirectory("cabinet", "cabinet")
                    .addSubdirectory(new DirectoryLayerDirectory("game")));
    final FDBDatabase database = FDBDatabaseFactory.instance().getDatabase();
    final Tuple senetTuple;
    final Tuple urTuple;
    try (FDBRecordContext context = database.openContext()) {
        senetTuple = root.path("cabinet").add("game", "senet").toTuple(context);
        urTuple = root.path("cabinet").add("game", "royal_game_of_ur").toTuple(context);
        context.commit();
    }
    try (FDBRecordContext context = database.openContext()) {
        // Verify that I can create the tuple again using the directory layer values.
        assertEquals(senetTuple, root.path("cabinet")
                .add("game", senetTuple.getLong(1)).toTuple(context));
        assertEquals(urTuple, root.path("cabinet")
                .add("game", urTuple.getLong(1)).toTuple(context));
    }
}