title: Why does hamcrest say that a byte 0 is not equal to an int 0?
body: <p>Consider the following test case using standard <code>JUnit</code> asserts and hamcrest's <code>assertThat</code>:</p>
  
  <pre><code>byte b = 0;
  int i = 0;
  
  assertEquals(b, i); // success
  assertThat(b, equalTo(i)); // java.lang.AssertionError: Expected: &lt;0&gt; but: was &lt;0&gt;
  
  if (b == i) {
      fail(); // test fails, so b == i is true for the JVM
  }
  </code></pre>
  
  <p>Why is that so? The values are apparently equal for the JVM because <code>b == i</code> is <code>true</code>, so why does <code>hamcrest</code> fail?</p>