@Test public void testKvMatcherKeyFailure() throws Exception { AssertionError exc = assertionShouldFail( () -> assertThat(KV.of(1, 2), SerializableMatchers.kv(not(anything()), anything()))); assertThat(exc.getMessage(), Matchers.containsString("key did not match")); }
@Test public void testKvMatcherValueFailure() throws Exception { AssertionError exc = assertionShouldFail( () -> assertThat(KV.of(1, 2), SerializableMatchers.kv(anything(), not(anything())))); assertThat(exc.getMessage(), Matchers.containsString("value did not match")); }