public void setUp() throws Exception {
dataSource = new DriverManagerDataSource("jdbc:h2:mem:hibernate;DB_CLOSE_DELAY=-1", "sa", "sa");
System.setProperty("hibernate.dialect", H2Dialect.class.getName());
System.setProperty("hibernate.hbm2ddl.auto", "create-drop");
AnnotationSessionFactoryBean sessionFactory = new AnnotationSessionFactoryBean();
sessionFactory.setDataSource(dataSource);
sessionFactory.setAnnotatedClasses(new Class[] {PhotoSpot.class});
sessionFactory.afterPropertiesSet();
repo.hibernate = new HibernateTemplate(sessionFactory.getObject());
}