agave-jobs/jobs-core/src/test/java/org/iplantc/service/jobs/submission/AbstractJobSubmissionTest.java
/**
     * Creates a {@link Job} object with the given {@code status} using a random 
     * {@link Software} object pulled from the apps available to {@code username}. This method 
     * calls the {@link #createJob(JobStatusType, Software, ExecutionSystem, BatchQueue, String, StorageSystem)}
     * method using the {@link ExecutionSystem} and {@link ExecutionSystem#getDefaultQueue()} 
     * from the {@link Software} object.
     * 
     * The returned job has <em>NOT</em> been persisted.
     * 
	 * @param status the status of the new job
	 * @param username if null, {@link #SYSTEM_OWNER} will be used
	 * @return unsaved {@link Job} object
	 * @throws Exception if anything goes wrong
	 */
Creates a  Job object with the given  status using a random
Software object pulled from the apps available to  username.

The returned job has NOT been persisted.

@param status the status of the new job
@param username if null,  #SYSTEM_OWNER will be used
@return unsaved  Job object
@throws Exception if anything goes wrong
Creates a Job object with the given status using a random Software object pulled from the apps available to username . The returned job has NOT been persisted . @param status the status of the new job @param username if null #SYSTEM_OWNER will be used @return unsaved Job object @throws Exception if anything goes wrong
public Job createJob(JobStatusType status, String username)
	throws Exception 
	{   
	    if (StringUtils.isEmpty(username)) username = SYSTEM_OWNER;
	    Software software = SoftwareDao.getUserApps(username, true).get(0);
	    return createJob(status, 
                software, 
                software.getExecutionSystem(), 
                software.getExecutionSystem().getDefaultQueue(), 
                username, 
                (StorageSystem)systemDao.getGlobalDefaultSystemForTenant(RemoteSystemType.STORAGE, TenancyHelper.getCurrentTenantId()));
	}
public Job createJob ( JobStatusType status , String username ) throws Exception { if ( StringUtils . isEmpty ( username ) ) username = SYSTEM_OWNER ; Software software = SoftwareDao . getUserApps ( username , true ) . get ( 0 ) ; return createJob ( status , software , software . getExecutionSystem ( ) , software . getExecutionSystem ( ) . getDefaultQueue ( ) , username , ( StorageSystem ) systemDao . getGlobalDefaultSystemForTenant ( RemoteSystemType . STORAGE , TenancyHelper . getCurrentTenantId ( ) ) ) ; }
Creates a {@link Job} object with the given {@code status} using a random
 {@link Software} object pulled from the apps available to {@code username}.
Creates a { @link Job } object with the given { @code status } using a random { @link Software } object pulled from the apps available to { @code username } .