/** A {@link SerializableMatcher} that matches any {@link KV} with matching key and value. */ public static <K, V> SerializableMatcher<KV<? extends K, ? extends V>> kv( final SerializableMatcher<? super K> keyMatcher, final SerializableMatcher<? super V> valueMatcher) { return SerializableMatchers.allOf( SerializableMatchers.kvWithKey(keyMatcher), SerializableMatchers.kvWithValue(valueMatcher)); }
@Test public void testKvKeyMatcherSerializable() throws Exception { assertThat(KV.of("hello", 42L), SerializableUtils.ensureSerializable(kvWithKey("hello"))); }