title: java.lang.ClassCastException: java.util.HashMap$EntrySet cannot be cast to java.util.Map$Entry
body: <p>I have an overrriden method like this</p>
  
  <pre><code>@Override
  public Build auth (Map.Entry&lt;String, String&gt; auth) {
              this.mAuth = auth;
              return this;
  }
  </code></pre>
  
  <p>Here am trying to call this method in the following way</p>
  
  <pre><code>Map&lt;String, String&gt; authentication = new HashMap&lt;String , String&gt; ();        
           authentication.put("username" , "testname");
           authentication.put("password" , "testpassword");        
  
  Map.Entry&lt;String, String&gt; authInfo =(Entry&lt;String , String&gt;) authentication.entrySet();
  
  AuthMethod.auth(authInfo)
  </code></pre>
  
  <p>While running this am getting</p>
  
  <pre><code>java.lang.ClassCastException: java.util.HashMap$EntrySet cannot be cast to java.util.Map$Entry
  </code></pre>
  
  <p>How can i pass <code>Map.Entry&lt;String, String&gt;</code> to auth method</p>