@Override
    public ParameterValue createValue(StaplerRequest req, JSONObject jo) {
        StringParameterValue value = req.bindJSON(StringParameterValue.class, jo);
        value.setDescription(getDescription());
        checkValue(value, value.getValue());
        return value;
    }
@Test
    @Issue("JENKINS-62889")
    public void createValue_Invalid() {
        String stringValue = "single";
        String[] choices = new String[]{stringValue};
        ChoiceParameterDefinition parameterDefinition = new ChoiceParameterDefinition("name", choices, "description");
        assertThrows(IllegalArgumentException.class, () -> parameterDefinition.createValue("invalid"));
    }