title: How to unit tests method returning Java string?
body: <p>Hi I have plenty of methods which returns string which I need to unit tests. Now challenge for me is is how do I do code coverage? For e.g. My method looks like the following </p>
  
  <pre><code>Public String getSqlToDoXYZ(Myconfig config) {
  StringBuilder sb = new StringBuilder() ;
  sb.append(  "SELECT BLAH BLAH");
  sb.append("WHERE ABC="+config.getABC());
  return sb.toString() ;
  } 
  </code></pre>
  
  <p>Please give your ideas how to unit tests such scenario? I am using mockito to do unit testing. I am new to both mockito and unit testing please guide. Thanks in advance. </p>