}
public static HttpRequestConfig convert( OldRestRequestConfig old )
{
HttpRequestConfig config = HttpRequestConfig.Factory.newInstance();
config.setAssertionArray( old.getAssertionList().toArray( new TestAssertionConfig[old.sizeOfAssertionArray()] ) );
config.setAttachmentArray( old.getAttachmentList().toArray( new AttachmentConfig[old.sizeOfAttachmentArray()] ) );
XmlObject obj = old.getCredentials();
if( obj != null )
config.setCredentials( ( CredentialsConfig )obj.copy() );
obj = old.getParameters();
if( obj != null )
config.setParameters( ( RestParametersConfig )obj.copy() );
obj = old.getRequest();
if( obj != null )
config.setRequest( ( CompressedStringConfig )obj.copy() );
obj = old.getSettings();
if( obj != null )
config.setSettings( ( SettingsConfig )obj.copy() );
if( old.isSetDescription() )
config.setDescription( old.getDescription() );
config.setEncoding( old.getEncoding() );
config.setEndpoint( old.getEndpoint() );
config.setSslKeystore( old.getSslKeystore() );
if( old.isSetMediaType() )
config.setMediaType( old.getMediaType() );
if( old.isSetMethod() )
config.setMethod( old.getMethod() );
if( old.isSetName() )
config.setName( old.getName() );
if( old.isSetPostQueryString() )
config.setPostQueryString( old.getPostQueryString() );
return config;
}