@Test public void testSetEmrRolesFromAmazonAccount_RolesListNotEmpty() throws Exception { AbstractModelList<String> expectedRolesList = new AbstractModelList<>(); expectedRolesList.add( "default_role" ); expectedRolesList.add( "emr_role" ); AmazonHiveJobExecutor jobEntry = spy( new AmazonHiveJobExecutor() ); AmazonHiveJobExecutorController hiveJobExecutorController = PowerMockito.spy( new AmazonHiveJobExecutorController( container, jobEntry, bindingFactory ) ); AimClientImpl aimClient = mock( AimClientImpl.class ); when( aimClient.getEmrRolesFromAmazonAccount() ).thenReturn( expectedRolesList ); org.powermock.reflect.Whitebox.invokeMethod( hiveJobExecutorController, "setEmrRolesFromAmazonAccount", aimClient ); assertEquals( expectedRolesList.size(), hiveJobExecutorController.getEmrRoles().size() ); }
public AbstractModelList<String> getEmrRoles() { return emrRoles; }
AbstractAmazonJobExecutorController extends AbstractXulEventHandler { public AbstractModelList<String> getEmrRoles() { return emrRoles; } }
AbstractAmazonJobExecutorController extends AbstractXulEventHandler { public AbstractModelList<String> getEmrRoles() { return emrRoles; } AbstractAmazonJobExecutorController( XulDomContainer container, AbstractAmazonJobEntry jobEntry,
                                              BindingFactory bindingFactory );  AbstractAmazonJobExecutorController(); }
AbstractAmazonJobExecutorController extends AbstractXulEventHandler { public AbstractModelList<String> getEmrRoles() { return emrRoles; } AbstractAmazonJobExecutorController( XulDomContainer container, AbstractAmazonJobEntry jobEntry,
                                              BindingFactory bindingFactory );  AbstractAmazonJobExecutorController(); void updateClusterState(); AbstractModelList<String> getReleases(); void getEmrSettings(); AbstractModelList<String> getEc2Roles(); AbstractModelList<String> getEmrRoles(); AbstractModelList<String> getMasterInstanceTypes(); AbstractModelList<String> getSlaveInstanceTypes(); AbstractModelList<String> getRegions(); void setBindings( List<Binding> bindings ); void accept(); List<String> getValidationWarnings(); String getSelectedEc2Role(); String getSelectedEmrRole(); String getSelectedMasterInstanceType(); String getSelectedSlaveInstanceType(); void setSelectedEc2Role( String selectedEc2Role ); void setSelectedEmrRole( String selectedEmrRole ); void setSelectedMasterInstanceType( String selectedMasterInstanceType ); void setSelectedSlaveInstanceType( String selectedSlaveInstanceType ); String getSelectedRegion(); void setSelectedRegion( String selectedRegion ); JobEntryInterface open(); void init(); void cancel(); void openErrorDialog( String title, String message ); void closeErrorDialog(); FileObject browse( String[] fileFilters, String[] fileFilterNames, String fileUri ); FileObject browse( String[] fileFilters, String[] fileFilterNames, String fileUri, int fileDialogMode ); FileObject browse( String[] fileFilters, String[] fileFilterNames, String fileUri, FileSystemOptions opts ); FileObject browse( String[] fileFilters, String[] fileFilterNames, String fileUri, FileSystemOptions opts,
                            int fileDialogMode ); FileObject browse( String[] fileFilters, String[] fileFilterNames, String fileUri, FileSystemOptions opts,
                            int fileDialogMode, boolean showFileScheme ); void browseS3StagingDir(); VariableSpace getVariableSpace(); @Override String getName(); String getJobEntryName(); void setJobEntryName( String jobEntryName ); String getHadoopJobName(); void setHadoopJobName( String hadoopJobName ); String getHadoopJobFlowId(); void setHadoopJobFlowId( String hadoopJobFlowId ); String getAccessKey(); void setAccessKey( String accessKey ); String getSecretKey(); void setSecretKey( String secretKey ); String getSessionToken(); void setSessionToken( String sessionToken ); String getRegion(); void setRegion( String region ); String getStagingDir(); void setStagingDir( String stagingDir ); FileObject getStagingDirFile(); void setStagingDirFile( FileObject stagingDirFile ); String getJarUrl(); void setJarUrl( String jarUrl ); String getNumInstances(); void setNumInstances( String numInstances ); String getMasterInstanceType(); void setMasterInstanceType( String masterInstanceType ); String getSlaveInstanceType(); void setSlaveInstanceType( String slaveInstanceType ); String getEc2Role(); void setEc2Role( String ec2Role ); String getEmrRole(); void setEmrRole( String emrRole ); void invertBlocking(); abstract AbstractAmazonJobEntry getJobEntry(); abstract void setJobEntry( AbstractAmazonJobEntry jobEntry ); String getCommandLineArgs(); void setCommandLineArgs( String commandLineArgs ); boolean isRunOnNewCluster(); void setRunOnNewCluster( boolean selected ); boolean getBlocking(); void setBlocking( boolean blocking ); String getLoggingInterval(); void setLoggingInterval( String loggingInterval ); String getEmrRelease(); void setEmrRelease( String emrRelease ); boolean isAlive(); void setAlive( boolean alive ); void invertAlive(); FileObject resolveFile( String fileUri ); void help(); }
AbstractAmazonJobExecutorController extends AbstractXulEventHandler { public AbstractModelList<String> getEmrRoles() { return emrRoles; } AbstractAmazonJobExecutorController( XulDomContainer container, AbstractAmazonJobEntry jobEntry,
                                              BindingFactory bindingFactory );  AbstractAmazonJobExecutorController(); void updateClusterState(); AbstractModelList<String> getReleases(); void getEmrSettings(); AbstractModelList<String> getEc2Roles(); AbstractModelList<String> getEmrRoles(); AbstractModelList<String> getMasterInstanceTypes(); AbstractModelList<String> getSlaveInstanceTypes(); AbstractModelList<String> getRegions(); void setBindings( List<Binding> bindings ); void accept(); List<String> getValidationWarnings(); String getSelectedEc2Role(); String getSelectedEmrRole(); String getSelectedMasterInstanceType(); String getSelectedSlaveInstanceType(); void setSelectedEc2Role( String selectedEc2Role ); void setSelectedEmrRole( String selectedEmrRole ); void setSelectedMasterInstanceType( String selectedMasterInstanceType ); void setSelectedSlaveInstanceType( String selectedSlaveInstanceType ); String getSelectedRegion(); void setSelectedRegion( String selectedRegion ); JobEntryInterface open(); void init(); void cancel(); void openErrorDialog( String title, String message ); void closeErrorDialog(); FileObject browse( String[] fileFilters, String[] fileFilterNames, String fileUri ); FileObject browse( String[] fileFilters, String[] fileFilterNames, String fileUri, int fileDialogMode ); FileObject browse( String[] fileFilters, String[] fileFilterNames, String fileUri, FileSystemOptions opts ); FileObject browse( String[] fileFilters, String[] fileFilterNames, String fileUri, FileSystemOptions opts,
                            int fileDialogMode ); FileObject browse( String[] fileFilters, String[] fileFilterNames, String fileUri, FileSystemOptions opts,
                            int fileDialogMode, boolean showFileScheme ); void browseS3StagingDir(); VariableSpace getVariableSpace(); @Override String getName(); String getJobEntryName(); void setJobEntryName( String jobEntryName ); String getHadoopJobName(); void setHadoopJobName( String hadoopJobName ); String getHadoopJobFlowId(); void setHadoopJobFlowId( String hadoopJobFlowId ); String getAccessKey(); void setAccessKey( String accessKey ); String getSecretKey(); void setSecretKey( String secretKey ); String getSessionToken(); void setSessionToken( String sessionToken ); String getRegion(); void setRegion( String region ); String getStagingDir(); void setStagingDir( String stagingDir ); FileObject getStagingDirFile(); void setStagingDirFile( FileObject stagingDirFile ); String getJarUrl(); void setJarUrl( String jarUrl ); String getNumInstances(); void setNumInstances( String numInstances ); String getMasterInstanceType(); void setMasterInstanceType( String masterInstanceType ); String getSlaveInstanceType(); void setSlaveInstanceType( String slaveInstanceType ); String getEc2Role(); void setEc2Role( String ec2Role ); String getEmrRole(); void setEmrRole( String emrRole ); void invertBlocking(); abstract AbstractAmazonJobEntry getJobEntry(); abstract void setJobEntry( AbstractAmazonJobEntry jobEntry ); String getCommandLineArgs(); void setCommandLineArgs( String commandLineArgs ); boolean isRunOnNewCluster(); void setRunOnNewCluster( boolean selected ); boolean getBlocking(); void setBlocking( boolean blocking ); String getLoggingInterval(); void setLoggingInterval( String loggingInterval ); String getEmrRelease(); void setEmrRelease( String emrRelease ); boolean isAlive(); void setAlive( boolean alive ); void invertAlive(); FileObject resolveFile( String fileUri ); void help(); static final String JOB_ENTRY_NAME; static final String HADOOP_JOB_NAME; static final String HADOOP_JOB_FLOW_ID; static final String JAR_URL; static final String ACCESS_KEY; static final String SECRET_KEY; static final String SESSION_TOKEN; static final String STAGING_DIR; static final String STAGING_DIR_FILE; static final String NUM_INSTANCES; static final String REGION; static final String MASTER_INSTANCE_TYPE; static final String SLAVE_INSTANCE_TYPE; static final String EC2_ROLE; static final String EMR_ROLE; static final String CMD_LINE_ARGS; static final String BLOCKING; static final String RUN_ON_NEW_CLUSTER; static final String LOGGING_INTERVAL; static final String ALIVE; static final String XUL_JOBENTRY_NAME; static final String XUL_JOBENTRY_HADOOPJOB_NAME; static final String XUL_ACCESS_KEY; static final String XUL_SECRET_KEY; static final String XUL_SESSION_TOKEN; static final String XUL_EMR_SETTINGS; static final String XUL_REGION; static final String XUL_EC2_ROLE; static final String XUL_EMR_ROLE; static final String XUL_MASTER_INSTANCE_TYPE; static final String XUL_SLAVE_INSTANCE_TYPE; static final String XUL_EMR_RELEASE; static final String XUL_JOBENTRY_HADOOPJOB_FLOW_ID; static final String XUL_S3_STAGING_DIRECTORY; static final String XUL_COMMAND_LINE_ARGUMENTS; static final String XUL_NUM_INSTANCES; static final String XUL_BLOCKING; static final String XUL_LOGGING_INTERVAL1; static final String XUL_ALIVE; static final String XUL_AMAZON_EMR_JOB_ENTRY_DIALOG; static final String XUL_AMAZON_EMR_ERROR_DIALOG; static final String XUL_AMAZON_EMR_ERROR_MESSAGE; static final String XUL_CLUSTER_TAB; static final String XUL_NEW_CLUSTER_DECK; static final String XUL_EXISTING_CLUSTER_DECK; static final String XUL_CLUSTER_MODE; }