title: JUnit assertThat: check that Object equals String
body: <p>I have <code>Map</code> declared as following:</p>
  
  <pre><code>Map&lt;String, Object&gt; data
  </code></pre>
  
  <p>I put a <code>String</code> in it and verify its value like this:</p>
  
  <pre><code>assertEquals("value", data.get("key"));
  </code></pre>
  
  <p>Now, I'd like to rewrite the verification to use <code>assertThat</code> instead of <code>assertEquals</code>. I've tried the following:</p>
  
  <pre><code>assertThat(data.get("key"), equalTo("value"));
  </code></pre>
  
  <p>And of course it didn't work because of type mismatch:</p>
  
  <blockquote>
    <p><code>Wrong 2nd argument type. Found: 'org.hamcrest.Matcher&lt;java.lang.String&gt;', required: 'org.hamcrest.Matcher&lt;? super java.lang.Object&gt;' less...</code></p>
  </blockquote>
  
  <p>Explicit type cast of the first argument to <code>String</code> helps, but I'd like to avoid it. For example <code>assertEquals</code> doesn't require type cast.
  So, how can I check that the value, which was put into <code>Map</code> object, declared above, is equal to particular <code>String</code>, using the <code>assertThat</code> method?</p>