return sessionFactory.getCurrentSession();
}
@Before
public void init() {
UsrGroup group = new UsrGroup("main");
getSession().save(group);
User user1 = new User("User1");
user1Id = getSession().save(user1);
User user2 = new User("user2");
getSession().save(user2);
group.addUser(user1);
group.addUser(user2);
DefaultMapperFactory.Builder builder = new DefaultMapperFactory.Builder();
builder.unenhanceStrategy(new HibernateUnenhanceStrategy());
MapperFactory factory = builder.build();
mapperFacade = factory.getMapperFacade();