@Test
public void testClose() throws InterruptedException, DeadlockException, TransactionRolledBackException, IOException
{

    // Test close of cursor over empty (which starts out closed)
    {
        loadDisklessDatabase(0);
        Cursor cursor = map.first();
        assertNull(cursor.next());
        cursor.close();
        assertNull(cursor.next());
         cursor.close();
        assertNull(cursor.next());
    }
    // Test repeated close of cursor that wasn't closed to start
    {
        loadDisklessDatabase(10);
        Cursor cursor = map.first();
        assertNotNull(cursor.next());
        assertNotNull(cursor.next());
        cursor.close();
        assertNull(cursor.next());
        cursor.close();
        assertNull(cursor.next());
    }
}