The contract states that a non-null Map Entry will produce a non-null Pair, however this test fails:
@Test
void pairFromMapEntryWithEmptyKey() {
Pair pair = Pair.fromMapEntry(entry("", "empty-key"));
assertThat(pair).isNotNull();
}
We'll have to decide if we want to change the contract or the implementation. Technically speaking, both are breaking changes. I suspect that a change to the contract would affect fewer people but changing the implementation feels like it might be the better fix.