title: Checking HTTP status codes in groovy
body: <p>I have created a <code>RESTful</code> service and I am testing it in <code>SOAPUI</code> project.
  In a test case I want  to verify the <code>HTTP</code> response status codes in <code>groovy</code> script.</p>
  
  <p>I have tried using the following:</p>
  
  <pre><code>def value = messageExchange.responseHeaders["#status#"]
  
  assert value==200
  </code></pre>
  
  <p>But it always gives the error and doesn't validates.<em>(The test I am using does returns 200 status code, but I don't know how to put the groovy correctly)</em></p>
  
  <p>Can anyone plz guide me. I dont want to perform <code>GET</code> operation in the groovy. I am performing <code>GET</code> separately using soapui and I just want to test the status codes.</p>