public Flavor getFlavorOrThrow(String flavorName) {
        return getFlavor(flavorName).orElseThrow(() -> new IllegalArgumentException("Unknown flavor '" + flavorName + "'"));
    }
Returns the flavor with the given name or throws an IllegalArgumentException if it does not exist.
config-provisioning/src/main/java/com/yahoo/config/provision/NodeFlavors.java