private int computeLength(Shape shape) {
        // Create a random string that does not exceed or go under the length trait.
        int chars = 2;

        if (shape.hasTrait(LengthTrait.ID)) {
            LengthTrait trait = shape.expectTrait(LengthTrait.class);
            if (trait.getMin().isPresent()) {
                chars = Math.max(chars, trait.getMin().get().intValue());
            }
            if (trait.getMax().isPresent()) {
                chars = Math.min(chars, trait.getMax().get().intValue());
            }
        }

        return chars;
    }
Generates fake data from a modeled shape for static JMESPath analysis.
smithy-waiters/src/main/java/software/amazon/smithy/waiters/ModelRuntimeTypeGenerator.java