title: How to perform deeper matching of keys and values with assertj
body: <p>Say I have a class like this:</p>
  
  <pre><code>public class Character {
     public Character(String name){
        this.name = name;
     }
     private String name;
     public String getName() { return name; }
  }
  </code></pre>
  
  <p>And later, a Map</p>
  
  <pre><code>Map&lt;Character, Integer&gt; characterAges = new HashMap&lt;Character, Integer&gt;();
  characterAges.put(new Character("Frodo"), 34);
  </code></pre>
  
  <p>Using assertj, what is the best way to test that characterAges includes the "Frodo" character?  For the age, I can do:</p>
  
  <pre><code>assertThat(characterAges).hasValue(34);
  </code></pre>
  
  <p>And I know I could do:</p>
  
  <pre><code>assertThat(characterAges.keySet())
                 .extracting("name")
                 .contains("Frodo");
  </code></pre>
  
  <p>But then I lose my fluency.  What I really want it something like this:</p>
  
  <pre><code>assertThat(characterAges)
                 .hasKey(key.extracting("name").contains("Frodo")
                 .hasValue(34);
  </code></pre>
  
  <p>Or even better, so that I can make sure my key and value match:</p>
  
  <pre><code>assertThat(characterAges)
                 .hasEntry(key.extracting("name").contains("Frodo"), 34);
  </code></pre>
  
  <p>Is something like this possible?</p>