StoredProcedureImpl extends AbstractProcedureImpl implements StoredProcedure { @Override public void removeResultSet( final UnitOfWork transaction ) throws KException { ArgCheck.isNotNull( transaction, "transaction" ); ArgCheck.isTrue( ( transaction.getState() == State.NOT_STARTED ), "transaction state is not NOT_STARTED" ); final ProcedureResultSet resultSet = getResultSet( transaction ); if ( resultSet == null ) { throw new KException( Messages.getString( Relational.RESULT_SET_NOT_FOUND_TO_REMOVE, getAbsolutePath() ) ); } resultSet.remove( transaction ); } StoredProcedureImpl( final UnitOfWork uow,
                                final Repository repository,
                                final String workspacePath ); @Override KomodoType[] getChildTypes(); @Override String getNativeQuery( final UnitOfWork transaction ); @Override ProcedureResultSet getResultSet( final UnitOfWork transaction ); @Override Map< String, String > getStandardOptions(); @Override KomodoType getTypeIdentifier( final UnitOfWork transaction ); @Override Model getParent( final UnitOfWork transaction ); @Override boolean isNonPrepared( final UnitOfWork transaction ); @Override boolean isStandardOption( final String name ); @Override void removeResultSet( final UnitOfWork transaction ); @Override void setNativeQuery( final UnitOfWork transaction,
                                final String newNativeQuery ); @Override void setNonPrepared( final UnitOfWork transaction,
                                final boolean newNonPrepared ); @SuppressWarnings( "unchecked" ) @Override T setResultSet( final UnitOfWork transaction,
                                                            final Class< T > resultSetType );  }
@Test( expected = KException.class ) public void shouldFailRemovingResultSetIfOneDoesNotExist() throws Exception { this.procedure.removeResultSet( getTransaction() ); }