### Question:
ParameterPropertyConverter extends SingleTypedConverter<ParametersDefinitionProperty> { @Override public boolean convert(ConverterRequest request, ConverterResult result, Object target) { ParametersDefinitionProperty parametersDefinitionProperty = (ParametersDefinitionProperty) target; if(parametersDefinitionProperty.getParameterDefinitions().isEmpty()){ return true; } ModelASTPipelineDef model = result.getModelASTPipelineDef(); if(model.getParameters()==null){ model.setParameters( new ModelASTBuildParameters( this ) ); } int numWarnings = result.getWarnings().size(); parametersDefinitionProperty.getParameterDefinitions() .forEach( parameterDefinition -> { ModelASTBuildParameter parameter = build(parameterDefinition, result); if(parameter!=null){ ModelASTUtils.addParameter(model, parameter); } } ); if (result.getWarnings().size() > numWarnings) { return false; } return true; }  @Override boolean convert(ConverterRequest request, ConverterResult result, Object target);  }### Answer:
@Test public void simpletest() throws Exception { String projectName = Long.toString( System.currentTimeMillis() ); FreeStyleProject p = j.createFreeStyleProject( projectName ); List<ParameterDefinition> parametersDefinitions = new ArrayList<>(); parametersDefinitions.add( new StringParameterDefinition( "str", "defaultValue", "description str", true ) ); parametersDefinitions.add( new ChoiceParameterDefinition( "choices", new String[]{ "choice1", "choice2" }, "description choice" ) ); parametersDefinitions.add( new BooleanParameterDefinition( "nameboolean", true, "boolean description" ) ); ParametersDefinitionProperty parametersDefinitionProperty = new ParametersDefinitionProperty( parametersDefinitions ); p.addProperty( parametersDefinitionProperty ); ParameterPropertyConverter converter = j.jenkins.getExtensionList( ParameterPropertyConverter.class ).get( 0 ); assertTrue( converter.canConvert( parametersDefinitionProperty ) ); ConverterResult result = new ConverterResult(); converter.convert( new ConverterRequest(), result, parametersDefinitionProperty ); ModelASTBuildParameters parameters = result.getModelASTPipelineDef().getParameters(); assertEquals( 3, parameters.getParameters().size() ); String groovy = parameters.toGroovy(); assertThat( groovy, containsString( "string" ) ); assertThat( groovy, containsString( "name: 'str'" ) ); assertThat( groovy, containsString( "defaultValue: 'defaultValue'" ) ); assertThat( groovy, containsString( "description: 'description str'" ) ); assertThat( groovy, containsString( "choice" ) ); assertThat( groovy, containsString( "name: 'choices'" ) ); assertThat( groovy, containsString( "choices: [choice1, choice2]" ) ); assertThat( groovy, containsString( "description: 'description choice'" ) ); assertThat( groovy, containsString( "booleanParam" ) ); assertThat( groovy, containsString( "name: 'nameboolean'" ) ); assertThat( groovy, containsString( "defaultValue: true" ) ); assertThat( groovy, containsString( "description: 'boolean description'" ) ); }