title: Can assertEquals(Long,Integer) succeed?
body: <p>Currently I am doing some code review and I found this line of code which interrupts the testcase:</p>
  
  <pre><code>assertEquals(Long.valueOf(4321), lMessage.getNumber());
  </code></pre>
  
  <p><code>getNumber</code> returns an <code>Integer</code> which is also <code>4321</code>.
  I changed it to this:</p>
  
  <pre><code>assertTrue(4321 == lSavedStoerung.getMessage());
  </code></pre>
  
  <p>because in my understanding of the equals method the <code>assertEquals</code> can never return true in the first example. With my <code>assertTrue</code> all test cases running fine.</p>
  
  <p>Or did I understand something wrong?</p>