try {
User user1 = new User(null, "Pocoyo");
sqlSession.insert("insertIdentity", user1);
User user2 = new User(null, "Valentina");
sqlSession.insert("insertIdentity", user2);
sqlSession.flushStatements();
assertEquals(Integer.valueOf(0), user1.getId());
assertEquals(Integer.valueOf(1), user2.getId());
sqlSession.commit();
} finally {
sqlSession.close();