@Test
	public void testListCredentials() throws Exception {
		Folder folder = jenkinsRule.jenkins.createProject(Folder.class, "folder" + jenkinsRule.jenkins.getItems().size());
		CredentialsStore folderStore = this.getFolderStore(folder);
		StandardUsernamePasswordCredentials folderCredentials = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL,
				"folder-creds", "test-creds", "aws-access-key-id", "aws-secret-access-key");
		StandardUsernamePasswordCredentials globalCredentials = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL,
				"global-creds", "test-creds", "aws-access-key-id", "aws-secret-access-key");

		folderStore.addCredentials(Domain.global(), folderCredentials);
		SystemCredentialsProvider.getInstance().getCredentials().add(globalCredentials);
		SystemCredentialsProvider.getInstance().save();

		WorkflowJob job = folder.createProject(WorkflowJob.class, "testStepWithFolderCredentials");
		final WithAWSStep.DescriptorImpl descriptor = jenkinsRule.jenkins.getDescriptorByType(WithAWSStep.DescriptorImpl.class);

		// 3 options: Root credentials, folder credentials and "none"
		ListBoxModel list = descriptor.doFillCredentialsItems(job);
		Assert.assertEquals(3, list.size());

		StandardUsernamePasswordCredentials systemCredentials = new UsernamePasswordCredentialsImpl(CredentialsScope.SYSTEM,
				"system-creds", "test-creds", "aws-access-key-id", "aws-secret-access-key");
		SystemCredentialsProvider.getInstance().getCredentials().add(systemCredentials);

		// Still 3 options: Root credentials, folder credentials and "none"
		list = descriptor.doFillCredentialsItems(job);
		Assert.assertEquals(3, list.size());
	}
Test the behavior of the {@link WithAWSStep}

@author Allan Burdajewicz
src/test/java/de/taimos/pipeline/aws/WithAWSStepTest.java