@@ -0,0 +1,2814 @@
+/**%0A * %0A */%0Apackage com.github.podd.api.file.test;%0A%0Aimport java.util.Set;%0A%0Aimport org.junit.After;%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.openrdf.model.URI;%0Aimport org.openrdf.repository.Repository;%0Aimport org.openrdf.repository.RepositoryConnection;%0Aimport org.openrdf.repository.sail.SailRepository;%0Aimport org.openrdf.sail.memory.MemoryStore;%0A%0Aimport com.github.podd.api.file.PoddFileReference;%0Aimport com.github.podd.api.file.PoddFileReferenceManager;%0Aimport com.github.podd.api.file.PoddFileReferenceProcessorFactoryRegistry;%0A%0A/**%0A * Abstract test class for PoddFileReferenceManager.%0A * %0A * @author kutila%0A */%0Apublic abstract class AbstractPoddFileReferenceManagerTest%0A%7B%0A%0A    protected PoddFileReferenceManager testFileReferenceManager;%0A    %0A    private PoddFileReferenceProcessorFactoryRegistry testRegistry;%0A    %0A    private Repository testRepository;%0A    %0A    protected RepositoryConnection testRepositoryConnection;%0A    %0A    /**%0A     * @return A new PoddFileReferenceManager instance for use by this test%0A     */%0A    public abstract PoddFileReferenceManager getNewPoddFileReferenceManager();%0A    %0A    /**%0A     * @return A new FileReferenceProcessorFactory Registry for use by this test%0A     */%0A    public abstract PoddFileReferenceProcessorFactoryRegistry getNewPoddFileReferenceProcessorFactoryRegistry();%0A    %0A    @Before%0A    public void setUp() throws Exception%0A    %7B%0A        this.testRegistry = this.getNewPoddFileReferenceProcessorFactoryRegistry();%0A        Assert.assertNotNull(%22Null implementation of test Registry%22, this.testRegistry);%0A        %0A        this.testFileReferenceManager = this.getNewPoddFileReferenceManager();%0A        Assert.assertNotNull(%22Null implementation of test FileReferenceManager%22, this.testFileReferenceManager);%0A        %0A        this.testRepository = new SailRepository(new MemoryStore());%0A        this.testRepository.initialize();%0A        %0A        this.testRepositoryConnection = this.testRepository.getConnection();%0A        this.testRepositoryConnection.begin(); // Transaction per each test%0A        %0A        this.testFileReferenceManager.setProcessorFactoryRegistry(this.testRegistry);%0A    %7D%0A    %0A    @After%0A    public void tearDown() throws Exception%0A    %7B%0A        this.testRegistry.clear();%0A        this.testRepositoryConnection.rollback();%0A        this.testRepositoryConnection.close();%0A        this.testRepository.shutDown();%0A        %0A        this.testFileReferenceManager = null;%0A    %7D%0A %0A    @Test%0A    public void testExtractFileReferences() throws Exception%0A    %7B%0A        URI someContext = null;%0A        Set%3CPoddFileReference%3E extractedFileReferences =%0A                this.testFileReferenceManager.extractFileReferences(testRepositoryConnection, someContext);%0A        // FIXME%0A    %7D%0A    %0A    // TODO add more tests%0A%7D%0A

add initial version of abstract test for PoddFileReferenceManager