HibernateObjectQuery { public static <T> T save(final T entity) { return HibernateSessionFactory.doInTransaction(new IRequest<T>() { @Override public T doInTransaction(Session session) { session.save(entity); return entity; } }); }  static T save(final T entity); static T saveOrUpdate(final T entity); static Iterable<T> saveAll(final Iterable<T> entities); static Iterable<T> saveOrUpdateAll(final Iterable<T> entities); static void delete(final T entity); static void deleteAll(final Iterable<T> entities);  }
@Test public void save() { Root root = rootA(); assertThat(H.save(root)).isSameAs(root); int count = createRequestForRootA().count(); assertThat(count).isEqualTo(1); }