private Optional<ValidationEvent> validateService(ServiceShape service, ServiceTrait trait) {
        String message = null;
        String source = trait.getCloudTrailEventSource();
        String expectedEventSource = trait.getArnNamespace() + ".amazonaws.com";

        if (!Objects.equals(KNOWN_EXCEPTIONS.get(expectedEventSource), source)) {
            if (source.contains("REPLACE") || StringUtils.upperCase(source).equals(source)) {
                // TODO: ideally this can become a DANGER event in the future.
                message = "aws.api#service|cloudTrailEventSource must not use placeholders, but found: " + source;
            } else if (!source.equals(expectedEventSource)) {
                message = String.format("aws.api#service|cloudTrailEventSource does not match the expected value. "
                        + "Expected '%s', but found '%s'.", expectedEventSource, source);
            }
        }

        return message == null ? Optional.empty() : Optional.of(warning(service, trait, message));
    }
Validates that the aws.api#service/eventSource property matches
{@code aws.api#service/arnNamespace} + ".amazonaws.com" and does
not use incorrect formats.
smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/EventSourceValidator.java