private String createBreakingMessage(TraitDefinition.ChangeType type, String path, Node left, Node right) {
            String leftPretty = ValidationUtils.tickedPrettyPrintedNode(left);
            String rightPretty = ValidationUtils.tickedPrettyPrintedNode(right);

            switch (type) {
                case ADD:
                    if (!path.isEmpty()) {
                        return String.format("Added trait contents to `%s` at path `%s` with value %s",
                                trait.getId(),
                                path,
                                rightPretty);
                    } else if (Node.objectNode().equals(right)) {
                        return String.format("Added trait `%s`", trait.getId());
                    } else {
                        return String.format("Added trait `%s` with value %s", trait.getId(), rightPretty);
                    }
                case REMOVE:
                    if (!path.isEmpty()) {
                        return String.format("Removed trait contents from `%s` at path `%s`. Removed value: %s",
                                trait.getId(),
                                path,
                                leftPretty);
                    } else if (Node.objectNode().equals(left)) {
                        return String.format("Removed trait `%s`", trait.getId());
                    } else {
                        return String.format("Removed trait `%s`. Previous trait value: %s",
                                trait.getId(),
                                leftPretty);
                    }
                case UPDATE:
                    if (!path.isEmpty()) {
                        return String.format("Changed trait contents of `%s` at path `%s` from %s to %s",
                                trait.getId(),
                                path,
                                leftPretty,
                                rightPretty);
                    } else {
                        return String.format("Changed trait `%s` from %s to %s",
                                trait.getId(),
                                leftPretty,
                                rightPretty);
                    }
                default:
                    throw new UnsupportedOperationException("Expected add, remove, update: " + type);
            }
        }
Finds breaking changes related to when a trait is added, removed, or
updated based on the breakingChanges property of traits.
smithy-diff/src/main/java/software/amazon/smithy/diff/evaluators/TraitBreakingChange.java