### Question:
AwsIamService { public SortedSet<String> getStatementActions(Statement statement) { List<Action> actions = statement.getActions(); if (actions == null) { return new TreeSet<>(); } return statement.getActions().stream() .map(Action::getActionName) .collect(Collectors.toCollection(TreeSet::new)); }  InstanceProfile getInstanceProfile(AmazonIdentityManagement iam, String instanceProfileArn,
            ValidationResultBuilder validationResultBuilder); Set<Role> getValidRoles(AmazonIdentityManagement iam, Set<String> roleArns,
            ValidationResultBuilder validationResultBuilder); Role getRole(AmazonIdentityManagement iam, String roleArn,
            ValidationResultBuilder validationResultBuilder); Policy getAssumeRolePolicy(Role role); Policy getPolicy(String policyFileName, Map<String, String> replacements); SortedSet<String> getStatementActions(Statement statement); SortedSet<String> getStatementResources(Statement statement); List<EvaluationResult> simulatePrincipalPolicy(AmazonIdentityManagement iam,
            String policySourceArn, Collection<String> actionNames, Collection<String> resourceArns); List<EvaluationResult> validateRolePolicies(AmazonIdentityManagement iam, Role role,
            Collection<Policy> policies);  }### Answer:
@Test public void testGetStatementActions() { assertThat(awsIamService.getStatementActions(new Statement(Effect.Allow))) .isEqualTo(new TreeSet<>()); SortedSet<String> expectedSingleAction = new TreeSet<>(); expectedSingleAction.add(S3Actions.GetObject.getActionName()); Statement statementSingleAction = new Statement(Effect.Allow).withActions(S3Actions.GetObject); assertThat(awsIamService.getStatementActions(statementSingleAction)) .isEqualTo(expectedSingleAction); SortedSet<String> expectedMultipleActions = new TreeSet<>(); expectedMultipleActions.add(S3Actions.GetObject.getActionName()); expectedMultipleActions.add(S3Actions.PutObject.getActionName()); Statement statementMultipleActions = new Statement(Effect.Allow) .withActions(S3Actions.GetObject, S3Actions.PutObject); assertThat(awsIamService.getStatementActions(statementMultipleActions)) .isEqualTo(expectedMultipleActions); }