title: addAssertion() not recognizing string value of "Contains" type
body: <p>I have a groovy script that I've added code to to check if a value exists in an XML response I'm getting within SoapUI.  I've been dealing with this for a few days and could use some help.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>import com.eviware.soapui.support.XmlHolder
  import com.eviware.soapui.impl.wsdl.teststeps.registry.RestRequestStepFactory
  
  // read your request template
  def requestFile = new File("C:/XMLRequestScript/file.xml");
  
  // parse it as xml
  def requestXml = new XmlHolder(requestFile.text)
  
  // get the current testCase to add testSteps later
  def tc = testRunner.testCase;
  
  // get the testStep as template to create the other requests
  def tsTemplate = tc.getTestStepByName("Template");
  
  // loop to create # of testSteps for each application
  for(int i = 1; i &lt; 3; i++) {
  // xpath expression to get applicationNumber attribute in root node
  def xpathNodeAttr = "/*/@ApplicationNumber";
  
  // get the root node attribute applicationNumber throught an XPATH
  int appId = Integer.parseInt(requestXml.getNodeValue(xpathNodeAttr));
  
  // add 1 to appId
  appId++;
  
  // set the value again in the attribute
  requestXml.setNodeValue(xpathNodeAttr,appId);
  
  // create next testStepName for new Application
  def testStepName = "TestStep_ApplicationNumber_" + String.valueOf(appId)
  log.info testStepName;
  log.info testStepName.getClass().getName()
  log.info tc.getClass().getName()
  
  // create a new testStepConfig
  def testStepFactory = new RestRequestStepFactory();
  def testStepConfig = testStepFactory.createConfig( tsTemplate.getTestRequest(), testStepName )
  
  // add the new testStep to TestCase
  def newTestStep = tc.insertTestStep( testStepConfig, -1 ) 
  
  // set the request
  newTestStep.getTestRequest().setRequestContent(requestXml.getXml())   
  
  // add Assertions here
  def assertion = tc.getTestStepByName(newTestStep.toString()).addAssertion("Contains")
  if (assertion.contains("Champion5")) {
      newTestStep.addAssertion("Champion5")
      log.info("REST response assertion created into: " + newTestStep)
  } else {
      log.info("REST response assertion not found in " + newTestStep)
  }
  if (assertion.contains("Challenger5")) {
      newTestStep.addAssertion("Challenger5")
      log.info("REST response assertion created into: " + newTestStep)
  } else {
  log.info("REST response assertion not found in " + newTestStep)
  }
  
  // execute the request 
  newTestStep.run(testRunner, context)
  </code></pre>
  
  <p>}</p>
  
  <p>In the section above called "// add Assertions here", the line of code that I'm having a problem with is:</p>
  
  <pre><code>def assertion = tc.getTestStepByName(newTestStep.toString()).addAssertion("Contains")
  </code></pre>
  
  <p>The error states:</p>
  
  <pre><code>Thu Sep 18 14:27:57 CDT 2014:ERROR:An error occurred [Cannot invoke method addAssertion() on null object], see error log for details
  </code></pre>
  
  <p>My understanding is that I have to pass an Assertion Type that is contained in the SoapUI GUI and just put it in as a string value in order to check if the values that I'm checking are asserted.  </p>
  
  <p>Any suggestions/direction would be appreciated.  I have no idea what I'm doing wrong.  Thanks.</p>