@@ -0,0 +1,1278 @@
+package org.lumongo.test.storage;%0A%0Aimport java.io.IOException;%0Aimport java.net.UnknownHostException;%0A%0Aimport org.apache.lucene.store.BaseDirectoryWrapper;%0Aimport org.apache.lucene.util.LuceneTestCase;%0Aimport org.lumongo.storage.lucene.DistributedDirectory;%0Aimport org.lumongo.storage.lucene.MongoDirectory;%0Aimport org.lumongo.util.TestHelper;%0A%0Aimport com.mongodb.MongoClient;%0Aimport com.mongodb.MongoException;%0A%0Apublic class LumongoTestCase extends LuceneTestCase %7B%0A%09%0A%09private static int indexNameCounter = 0;%0A%09%0A%09@Override%0A%09public void setUp() throws Exception %7B%0A%09%09MongoClient mongo = TestHelper.getMongo();%0A%09%09mongo.dropDatabase(TestHelper.TEST_DATABASE_NAME);%0A%09%09mongo.close();%0A%09%09super.setUp();%0A%09%7D%0A%09%0A%09public static BaseDirectoryWrapper newDirectory() %7B%0A%09%09%0A%09%09try %7B%0A%09%09%09final MongoClient mongo = TestHelper.getMongo();%0A%09%09%09return new BaseDirectoryWrapper(new DistributedDirectory(new MongoDirectory(mongo, TestHelper.TEST_DATABASE_NAME, %22index%22 + indexNameCounter++,%0A%09%09%09%09%09%09%09false, false) %7B%0A%09%09%09%09@Override%0A%09%09%09%09public void close() %7B%0A%09%09%09%09%09mongo.close();%0A%09%09%09%09%7D%0A%09%09%09%7D));%0A%09%09%7D%0A%09%09catch (UnknownHostException e) %7B%0A%09%09%09throw new RuntimeException(e);%0A%09%09%7D%0A%09%09catch (MongoException e) %7B%0A%09%09%09throw new RuntimeException(e);%0A%09%09%7D%0A%09%09catch (IOException e) %7B%0A%09%09%09throw new RuntimeException(e);%0A%09%09%7D%0A%09%09%0A%09%7D%0A%09%0A%7D%0A

Add lumongo test case that extends lucene test case