public Node expectMember(String name, String errorMessage) {
        return getMember(name).orElseThrow(() -> new ExpectationNotMetException(errorMessage, this));
    }
Gets the member with the given name, throwing
{@link ExpectationNotMetException} when the member is not present.

@param name Name of the member to get.
@param errorMessage The error message to use if the expectation is not met.
@return Returns the node with the given member name.
@throws ExpectationNotMetException when {@code memberName} is not
 present in the members map.
smithy-model/src/main/java/software/amazon/smithy/model/node/ObjectNode.java