title: Accessing null object field
body: <p>I have a test class in where I give a string value. But for one particular test I need to give null parameter. </p>
  
  <pre><code>setversion(versionString)
  </code></pre>
  
  <p>This is parsed in a contract class. In the contract class there is a method to parse string. </p>
  
  <pre><code>public void setversion(String versionString){
  versionString.trim(); 
  //some logic here with string
  }
  </code></pre>
  
  <p>When I made a method in the contract class that returns null when null is passed, then I got a review saying that it is not a good practice to change the contract class.</p>
  
  <pre><code> setversion(null);
  </code></pre>
  
  <p>I cannot change anything in the contract class where there is the method setVersion. How can I change the test method.</p>