UserDefinedFunctionImpl extends FunctionImpl implements UserDefinedFunction { @Override public void setJavaClass( final UnitOfWork transaction, final String newJavaClass ) throws KException { setStatementOption( transaction, StandardOption.JAVA_CLASS.name(), newJavaClass ); } UserDefinedFunctionImpl( final UnitOfWork uow,
                                    final Repository repository,
                                    final String workspacePath ); @Override String getCategory( final UnitOfWork transaction ); @Override String getJavaClass( final UnitOfWork transaction ); @Override String getJavaMethod( final UnitOfWork transaction ); @Override Map< String, String > getStandardOptions(); @Override int getTypeId(); @Override KomodoType getTypeIdentifier( final UnitOfWork uow ); @Override Model getParent( final UnitOfWork transaction ); @Override boolean isStandardOption( final String name ); @Override void setCategory( final UnitOfWork transaction,
                             final String newCategory ); @Override void setJavaClass( final UnitOfWork transaction,
                              final String newJavaClass ); @Override void setJavaMethod( final UnitOfWork transaction,
                               final String newJavaMethod );  }
@Test( expected = KException.class ) public void shouldNotAllowEmptyJavaClassIfNotSet() throws Exception { this.function.setJavaClass( getTransaction(), StringConstants.EMPTY_STRING ); }
@Test( expected = KException.class ) public void shouldNotAllowNullJavaClassIfNotSet() throws Exception { this.function.setJavaClass( getTransaction(), null ); }