I'm trying to figure out how org.mockito.AdditionalMatchers
works but I failed. Why is this test failing?
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.*;
import static org.mockito.AdditionalMatchers.*;
public class DemoTest {
@Test
public void testGreaterThan() throws Exception {
assertThat( 17
, is( gt( 10 ) )
);
}
}
Output is:
java.lang.AssertionError:
Expected: is <0>
got: <17>