@Override
    public void getErrors(ErrorCollection errors, String parentLocation) {
        String location = this.getLocation(parentLocation);
        if (new NameTypeValidator().isNameInvalid(name)) {
            errors.addError(location, NameTypeValidator.errorMessage("parameter", name));
        }
    }
@Test
    public void shouldAddAnErrorIfParameterNameIsBlank() {
        CRParameter crParameter = new CRParameter();
        ErrorCollection errorCollection = new ErrorCollection();
        crParameter.getErrors(errorCollection, "TEST");

        assertThat(errorCollection.getErrorsAsText()).contains("Invalid parameter name 'null'. This must be alphanumeric and can contain underscores, hyphens and periods (however, it cannot start with a period). The maximum allowed length is 255 characters.");
    }