@@ -0,0 +1,1688 @@
+package com.github.lucene.store.database;%0D%0A%0D%0Aimport java.io.IOException;%0D%0A%0D%0Aimport org.apache.lucene.document.Document;%0D%0Aimport org.apache.lucene.document.Field;%0D%0Aimport org.apache.lucene.document.StoredField;%0D%0Aimport org.apache.lucene.document.StringField;%0D%0Aimport org.apache.lucene.document.TextField;%0D%0Aimport org.apache.lucene.index.IndexWriter;%0D%0Aimport org.apache.lucene.index.IndexWriterConfig;%0D%0Aimport org.apache.lucene.index.IndexWriterConfig.OpenMode;%0D%0Aimport org.junit.Test;%0D%0A%0D%0Aimport com.github.lucene.store.AbstractSpringContextIntegrationTests;%0D%0Aimport com.github.lucene.store.TestUtils;%0D%0A%0D%0Apublic class DatabaseDirectoryIndexAddITest extends AbstractSpringContextIntegrationTests %7B%0D%0A%0D%0A    private static final OpenMode openMode = OpenMode.CREATE;%0D%0A    private static final boolean useCompoundFile = false;%0D%0A%0D%0A    @Test%0D%0A    public void addDocument() throws IOException %7B%0D%0A        final IndexWriterConfig config = TestUtils.getIndexWriterConfig(analyzer, openMode, useCompoundFile);%0D%0A        final IndexWriter writer = new IndexWriter(directory, config);%0D%0A        final Document doc = new Document();%0D%0A        doc.add(new StringField(%22index_store_unanalyzed%22, %22index store unanalyzed%22, Field.Store.YES));%0D%0A        doc.add(new StoredField(%22unindexed_store_unanalyzed%22, %22unindexed store unanalyzed%22));%0D%0A        doc.add(new StringField(%22index_unstore_unanalyzed%22, %22index unstore unanalyzed%22, Field.Store.NO));%0D%0A        doc.add(new TextField(%22index_store_analyzed%22, %22index store analyzed%22, Field.Store.YES));%0D%0A        doc.add(new TextField(%22index_unstore_analyzed%22, %22index unstore analyzed%22, Field.Store.NO));%0D%0A        writer.addDocument(doc);%0D%0A        writer.close();%0D%0A    %7D%0D%0A%7D%0D%0A

add integration test