title: Issue while assigning values to groovy class getting GroovyCastException
body: <p>Error</p>
  <pre><code>org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'maitadmin' with class 'java.lang.String' to class 'com.student.marks'
  </code></pre>
  <p>Below is the code</p>
  <pre><code>       public Marks getMarks(Map otherParams){
          Marks marks= new Marks();
          marks.user=otherParams.user;
          marks.id=otherParams.id;
          return marks;
          }
  </code></pre>
  <p>Caller method</p>
  <pre><code>Marks marks= getMarks(otherParams);
  </code></pre>