import junit.framework.TestCase;
import org.junit.*;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.datasource.SingleConnectionDataSource;

import javax.sql.DataSource;

import java.io.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Properties;

import static org.junit.Assert.assertTrue;

/**
 * Created by IntelliJ IDEA.
 * User: Andrey
 * Date: Apr 26, 2010
 * Time: 1:17:20 PM
 * To change this template use File | Settings | File Templates.
 */

public class AtlasInstallerTest {

    private static AtlasInstaller atlasInstaller;

    @BeforeClass
    public static void setUpGlobal() throws Exception{

        BeanFactory factory =
                new ClassPathXmlApplicationContext("applicationContext.xml");

        AtlasInstallerTest.atlasInstaller = (AtlasInstaller) factory.getBean("atlasInstaller");
    }


    @Before
    public void setUp() throws Exception {
        atlasInstaller.install();
    }

    @After
    public void tearDown() throws Exception {


    }

    @Test
    public void testInstall() throws Exception {
        String sql = "select count(1) from a2_experiment";

        int i = atlasInstaller.getJdbcTemplate().queryForInt(sql);

        Assert.assertEquals("experiment count", 1, i);
    }

    @Test
    public void testVwOntology()  throws Exception{
        atlasInstaller.getJdbcTemplate().execute("update CUR_PropertyValue set Value = 'pseudoheart' where Property = 'organismpart'");
        atlasInstaller.getJdbcTemplate().execute("commit");

        String sql = "select PropertyValue from vwassayproperty where assayid=2 and property='organismpart'";

        String result = (String) atlasInstaller.getJdbcTemplate().queryForObject(sql, String.class);

        Assert.assertEquals("property value", "pseudoheart" , result);

        atlasInstaller.getJdbcTemplate().execute("update CUR_PropertyValue set Value = 'heart' where Property = 'organismpart'");
        atlasInstaller.getJdbcTemplate().execute("commit");
    }
}

@@ -1,37 +1,4 @@
-import junit.framework.TestCase;%0A
 impo
@@ -9,24 +9,24 @@
 rg.junit.*;%0A
+
 import org.s
@@ -71,71 +71,8 @@
 ry;%0A
-import org.springframework.beans.factory.annotation.Autowired;%0A
 impo
@@ -145,530 +145,8 @@
 ext;
-%0Aimport org.springframework.jdbc.core.JdbcTemplate;%0Aimport org.springframework.jdbc.datasource.SingleConnectionDataSource;%0A%0Aimport javax.sql.DataSource;%0A%0Aimport java.io.*;%0Aimport java.sql.Connection;%0Aimport java.sql.DriverManager;%0Aimport java.text.SimpleDateFormat;%0Aimport java.util.Date;%0Aimport java.util.Properties;%0A%0Aimport static org.junit.Assert.assertTrue;%0A%0A/**%0A * Created by IntelliJ IDEA.%0A * User: Andrey%0A * Date: Apr 26, 2010%0A * Time: 1:17:20 PM%0A * To change this template use File %7C Settings %7C File Templates.%0A */
 %0A%0Apu
@@ -299,16 +299,17 @@
 xception
+ 
 %7B%0A%0A     
@@ -969,17 +969,16 @@
 tology()
- 
  throws 
@@ -986,16 +986,17 @@
 xception
+ 
 %7B%0A      
@@ -1395,24 +1395,24 @@
 ng.class);%0A%0A
+
         Asse
@@ -1458,17 +1458,16 @@
 doheart%22
- 
 , result

Optimise imports, removing javadoc template