@@ -0,0 +1,735 @@
+package org.flymine.sql;%0A%0Aimport junit.framework.*;%0A%0Aimport java.util.Properties;%0A%0Apublic class DatabaseFactoryTest extends TestCase%0A%7B%0A    Properties props;%0A%0A    public DatabaseFactoryTest(String arg1) %7B%0A        super(arg1);%0A    %7D%0A%0A%0A    public void testConfigure() throws Exception %7B%0A%0A        Database db1 = DatabaseFactory.getDatabase(%22db.unittest%22);%0A        Database db2 = DatabaseFactory.getDatabase(%22db.unittest%22);%0A%0A        // These should be exactly the same object%0A        assertTrue(db1 == db2);%0A    %7D%0A%0A    public void testNullName() throws Exception %7B%0A        try %7B%0A            DatabaseFactory.getDatabase(null);%0A            fail(%22Expected: NullPointerException%22);%0A        %7D catch (NullPointerException e) %7B%0A        %7D%0A    %7D%0A%0A%7D%0A

Test class for DatabaseFactory