@Test public void inequalityOfNullsFail() { try { assertThat((Long) null).isNotEqualTo((Integer) null); fail("Should have thrown"); } catch (AssertionError e) { assertThat(e.getMessage()).contains("Not true that <null> is not equal to <null>"); } }
@Test public void inequalityOfNulls() { assertThat((Long) null).isNotEqualTo(4); assertThat(4).isNotEqualTo((Long) null); }