private boolean exactlyOne(
            Collection<Map.Entry<MemberShape, Shape>> collection,
            Predicate<Map.Entry<MemberShape, Shape>> test
    ) {
        int count = 0;
        for (Map.Entry<MemberShape, Shape> entry : collection) {
            if (test.test(entry)) {
                ++count;
            }
        }
        return count == 1;
    }
Validates that service satisfies the AWS tagging requirements.
smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/tagging/TaggableResourceValidator.java