title: AssertJ to Hamcrest equivalency (only for Spring MVC Test): How test each POJO item of a collection (with dates)
body: <p>For a <code>Spring Framework</code> App, about Testing: </p>
  
  <ul>
  <li>The business layer is working  with <code>AssertJ</code> and <code>JUnit</code>. </li>
  <li>The web layer is working with <code>JUnit</code> and <code>Spring MVC Test</code>, where the latter works <strong>mandatorily</strong> with <code>Hamcrest</code>. See <a href="https://stackoverflow.com/questions/34447446/is-there-a-way-to-use-assertj-assertions-with-spring-mvc-test">Is there a way to use AssertJ assertions with Spring MVC Test?</a> (The answer is <strong>no</strong> yet)</li>
  </ul>
  
  <p>If in <code>AssertJ</code> is possible apply the following for a <em>collection</em>:</p>
  
  <pre><code>.containsExactly(tuple("087", "Peter", "Jordani", parse("1980-01-01")),
                   ...
                   tuple("088", "Isaias", "Jordano", parse("1980-01-01")))
  </code></pre>
  
  <p>What could be the best equivalent approximation of these three methods:</p>
  
  <ul>
  <li><code>containsExactly</code></li>
  <li><code>tuple</code></li>
  <li><code>parse</code></li>
  </ul>
  
  <p>To be applied in:</p>
  
  <pre><code> .andExpect(model().attribute("personas", ???)
  </code></pre>
  
  <p>I did a research in google: </p>
  
  <ul>
  <li>about collections there are samples for simple collections (<code>String</code>, <code>Integer</code> with <code>hasItems</code>) </li>
  <li>about dates, is working <em>only</em> with <code>Date</code> objects, of course same type, but not with <code>String</code> too.</li>
  </ul>