@Test public void testAnythingSerializable() throws Exception { SerializableUtils.ensureSerializable(anything()); }
@Test public void testAllOfSerializable() throws Exception { SerializableUtils.ensureSerializable(allOf(anything())); }
@Test public void testKvMatcherGBKLikeFailure() throws Exception { AssertionError exc = assertionShouldFail( () -> assertThat( KV.of("key", ImmutableList.of(1, 2, 3)), SerializableMatchers.<String, Iterable<Integer>>kv( anything(), containsInAnyOrder(1, 2, 3, 4)))); assertThat(exc.getMessage(), Matchers.containsString("value did not match")); }
@Test public void testKvMatcherGBKLikeSuccess() throws Exception { assertThat( KV.of("key", ImmutableList.of(1, 2, 3)), SerializableMatchers.<Object, Iterable<Integer>>kv( anything(), containsInAnyOrder(3, 2, 1))); }