public <T> T expectProperty(Property<T> property) {
        return getProperty(property).orElseThrow(() -> new IllegalArgumentException(String.format(
                "Property `%s` expected but not found on %s",
                property,
                this)));
    }
Get a property and throw if it isn't present.

@param property property key to get by exact reference identity.
@param <T> value type of the property.
@throws IllegalArgumentException if the property isn't found.
smithy-codegen-core/src/main/java/software/amazon/smithy/codegen/core/TypedPropertiesBag.java