### Question:
ConfigFileBuildWrapperConverter extends SingleTypedConverter<ConfigFileBuildWrapper> { @Override public boolean convert(ConverterRequest request, ConverterResult result, Object target) { ConfigFileBuildWrapper configFileBuildWrapper = (ConfigFileBuildWrapper) target; if(configFileBuildWrapper.getManagedFiles() == null || configFileBuildWrapper.getManagedFiles().isEmpty() ) { return true; } result.addWrappingTreeStep( () -> build( configFileBuildWrapper ) ); return true; }  @Override boolean convert(ConverterRequest request, ConverterResult result, Object target);  }### Answer:
@Test public void simpletest() throws Exception { ConfigFileBuildWrapperConverter converter = j.jenkins.getExtensionList( ConfigFileBuildWrapperConverter.class ).get( 0 ); ManagedFile managedFile1 = new ManagedFile( "id1", "myfile1.txt", "MYFILE1" ); ManagedFile managedFile2 = new ManagedFile( "id2", "myfile2.txt", "MYFILE2" ); ConfigFileBuildWrapper wrapper = new ConfigFileBuildWrapper( Arrays.asList( managedFile1, managedFile2 ) ); ConverterResult result = new ConverterResult(); converter.convert( new ConverterRequest(), result, wrapper ); assertEquals( 1, result.getWrappingTreeSteps().size() ); String groovy = result.getWrappingTreeSteps().get( 0 ).get().toGroovy(); assertThat( groovy, containsString( "configFileProvider" ) ); assertThat( groovy, containsString( "[configFile(" ) ); assertThat( groovy, containsString( "fileId:'id1'" ) ); assertThat( groovy, containsString( "targetLocation: 'myfile1.txt'" ) ); }
@Test public void simpletestemptyvalues() throws Exception { ConfigFileBuildWrapperConverter converter = j.jenkins.getExtensionList( ConfigFileBuildWrapperConverter.class ).get( 0 ); ConfigFileBuildWrapper wrapper = new ConfigFileBuildWrapper( Collections.emptyList() ); ConverterResult result = new ConverterResult(); converter.convert( new ConverterRequest(), result, wrapper ); }