Mapping mapping = new Mapping();
mapping.setConnection(conn.findById(99999l));
mapping.setName("mappingTest");
mapping.setTableName("tableTest");
ColumnAlias details = new ColumnAlias();
details.setAlias("aliastest");
details.setColumnFamily("columnFamilyTest");
details.setValueType(colType.findById(1l));
details.setMapping(mapping);
details.setQualifier("qualifierTest");
Map<String, ColumnAlias> mapColumnAlias = new HashMap<String, ColumnAlias>();
mapColumnAlias.put("aliastest", details);
mapping.setColumnAlias(mapColumnAlias);
mappingDAO.session = session;
mappingDAO.transaction = mappingDAO.session.getTransaction();
// mappingDAO.transaction.begin();
mapping.setColumnAlias(mapColumnAlias);
mappingDAO.save(mapping);
// mappingDAO.transaction.commit();
long mappingId = mapping.getId();
long detailsId = details.getId();
ResultSet rs = stmt.executeQuery("select * from mapping where id="
+ mappingId);
while (rs.next()) {