### Question:
JooqUnitOfWorkService implements UnitOfWorkService { @Override public UnitOfWork start() { try { Connection connection = managedDataSource.getConnection(); connection.setAutoCommit(false); UnitOfWork unitOfWork = jooqUnitOfWorkFactory.create(connection); CURRENT_UNIT_OF_WORK.set(unitOfWork); return unitOfWork; } catch (SQLException e) { throw new UnrecoverableException("Cannot start transaction", e); } } JooqUnitOfWorkService(ManagedDataSource managedDataSource, JooqUnitOfWorkFactory jooqUnitOfWorkFactory); @Override UnitOfWork getCurrent(); @Override UnitOfWork start(); @Override void commit(); @Override void abort();  }### Answer:
@Test public void testStart() throws Exception { Connection connection = mock(Connection.class); JooqUnitOfWork unitOfWork = mock(JooqUnitOfWork.class); when(unitOfWork.getConnection()).thenReturn(connection); when(jooqUnitOfWorkFactory.create(connection)).thenReturn(unitOfWork); when(managedDataSource.getConnection()).thenReturn(connection); UnitOfWork actual = sut.start(); verify(connection).setAutoCommit(false); assertThat(actual, is(unitOfWork)); }