String[] paths = new String[] { "config.xml", "data.xml", "hibernate.xml" }; ctx = new ClassPathXmlApplicationContext(paths);  ht = (HibernateTemplate) ctx.getBean("hibernateTemplate");  ht.execute(new HibernateCallback() {  public Object doInHibernate(org.hibernate.Session session) throws org.hibernate.HibernateException, java.sql.SQLException {  Experimenter o = (Experimenter) session.get(Experimenter.class, new Integer(1)); if (o == null) { o = new Experimenter(); o.setOmeName("test"); session.save(o); }  Event e = (Event) session.get(Event.class, new Integer(1)); if (e == null) { e = new Event(); e.setName("test"); session.save(e); }  ome.model.core.Pixels p = new ome.model.core.Pixels(); p.setSizeX(new Integer(1)); p.setSizeY(new Integer(1)); p.setSizeZ(new Integer(1)); p.setSizeC(new Integer(1)); p.setSizeT(new Integer(1)); p.setSha1("09bc7b2dcc9a510f4ab3a40c47f7a4cb77954356"); p.setBigEndian(Boolean.TRUE);  p.setCreationEvent(e); p.setOwner(o);   session.save(p); return null; }; });
initHibernate(); createExperimenter(); createEvent(); createPixels(); createPlanes();
    protected void setUp()    {        String[] paths = new String[] { "config.xml", "data.xml",                "hibernate.xml" };        ctx = new ClassPathXmlApplicationContext(paths);        ht = (HibernateTemplate) ctx.getBean("hibernateTemplate");        ht.execute(new HibernateCallback()        {            public Object doInHibernate(org.hibernate.Session session)                    throws org.hibernate.HibernateException,                    java.sql.SQLException            {                Experimenter o = (Experimenter) session.get(Experimenter.class, new Integer(1));                if (o == null)                {                    o = new Experimenter();                    o.setOmeName("test");                    session.save(o);                }                                   Event e = (Event) session.get(Event.class, new Integer(1));                if (e == null)                {                    e = new Event();                    e.setName("test");                    session.save(e);                }                                   ome.model.core.Pixels p = new ome.model.core.Pixels();                p.setSizeX(new Integer(1));                p.setSizeY(new Integer(1));                p.setSizeZ(new Integer(1));                p.setSizeC(new Integer(1));                p.setSizeT(new Integer(1));                p.setSha1("09bc7b2dcc9a510f4ab3a40c47f7a4cb77954356");  // "pixels"                p.setBigEndian(Boolean.TRUE);                                p.setCreationEvent(e);                p.setOwner(o);                                session.save(p);                return null;            };        });    }