@Test
public void testCommit() throws Exception {

    assertEquals(42L, Transaction.execute(new TransactionCallback<Object>() {
        @Override
        public Object doInTransaction(TransactionStatus status) {
            return 42L;
        }
    }));
    verify(conn).setAutoCommit(false);
    verify(conn, times(1)).commit();
    verify(conn, times(0)).rollback();
    verify(conn, times(1)).close();
}