class 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));
    }

}