WebUrlsDBDao { public Integer insert(Weburlsdb weburlsdb) { Session session = sessionFactory.getCurrentSession(); session.beginTransaction(); Long id=(Long)session.save(weburlsdb); session.getTransaction().commit(); return new Integer(id.intValue()); }  List<Weburlsdb> list(Integer pageNum, Integer numResults); Long totalRecordCount(); Weburlsdb get(Integer id); Integer insert(Weburlsdb weburlsdb); void update(Weburlsdb weburlsdb); void delete(Integer id);  }
@Ignore @Test public void testInsert() throws Exception { weburlsdb = new Weburlsdb(); weburlsdb.setAnchor("anchor"); weburlsdb.setDepth((short)1); weburlsdb.setDocid(2); weburlsdb.setDomain("domain"); weburlsdb.setInstanceexecid(new Long (3)); weburlsdb.setParentdocid(3); weburlsdb.setParenturl("parenturl"); weburlsdb.setPath("ssh"); weburlsdb.setPid(new Long(6)); weburlsdb.setPriority(1); weburlsdb.setSubdomain("subdomain"); weburlsdb.setTag("tag"); weburlsdb.setUniqid(new Long(4)); weburlsdb.setUrl("url1"); webUrlsDBDao.insert(weburlsdb); LOGGER.info("********insertion done************"); }