@Test public void shouldRollbackTransactionWhenRollbackOnOpenConnectionGiven() throws SQLException { sqlBuilder.rollback(); verify(connectionMock, times(1)).rollback(); }
@Test(expected = IllegalStateException.class) public void shouldThrowExceptionWhenRollbackOnAlreadyClosedBuilderGiven() throws SQLException { sqlBuilder.close(); sqlBuilder.rollback(); }