How to use (primitive) autoboxing/widening with Hamcrest?
I came across https://code.google.com/p/hamcrest/issues/detail?id=130 to add some sugar syntax for Hamcrest matchers. But the idea was rejected by the Hamcrest developers. Any other smart ideas to make tests better readable by avoiding having to type L behind longs? @Test public void test1() { int actual = 1; assertThat(actual, is(1)); } @Test public void test2() { long actual = 1L; assertThat(actual, is(1)); // fails as expected is <1> but result was <1L> // assertThat(actual, is(1L)); off course works.. } @Test public void test3() { Long actual = new Long(1); assertThat(actual, is(1)); //