@Test public void shouldCommitTransactionWhenCommitOnOpenConnectionGiven() throws SQLException { sqlBuilder.commit(); verify(connectionMock, times(1)).commit(); }
@Test(expected = IllegalStateException.class) public void shouldThrowExceptionWhenCommitOnAlreadyClosedBuilderGiven() throws SQLException { sqlBuilder.close(); sqlBuilder.commit(); }