@Test
	public void testStepWithBasicAndAwsGlobalCredentials() throws Exception {

		String globalBaseCreds = "global-basic-creds";
		String globalAwsCreds = "global-aws-creds";

		List<String> credentialIds = new ArrayList<>();
		credentialIds.add(globalBaseCreds);

		StandardUsernamePasswordCredentials key = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL,
				globalBaseCreds, "test-global-creds", "global-aws-access-key-id", "global-aws-secret-access-key");

		AmazonWebServicesCredentials amazonWebServicesCredentials = new AWSCredentialsImpl(CredentialsScope.GLOBAL,
				globalAwsCreds, "global-aws-access-key-id", "global-aws-secret-access-key", "Aws-Description",
				"Arn::Something:or:Other", "12345678");

		SystemCredentialsProvider.getInstance().getCredentials().add(amazonWebServicesCredentials);
		SystemCredentialsProvider.getInstance().getCredentials().add(key);
		SystemCredentialsProvider.getInstance().save();

		WorkflowJob job = jenkinsRule.jenkins.createProject(WorkflowJob.class, "testStepWithBasicAndAwsGlobalCredentials");
		job.setDefinition(new CpsFlowDefinition(""
				+ "node {\n"
				+ "  withAWS (credentials: '" + globalBaseCreds + "') {\n"
				+ "    echo 'It works!'\n"
				+ "  }\n"
				+ "}\n", true)
		);
		jenkinsRule.assertBuildStatusSuccess(job.scheduleBuild2(0));
	}
Test the behavior of the {@link WithAWSStep}

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