@Test
public void mapB() {

    Pair<Integer, Character> expectedResult = Pair.of(1, 'a');
    Optional<Pair<Integer, String>> boxedPair = Optional.of(Pair.of(1, "a"));
    Pair<Integer, Character> result = boxedPair.map(Pair.mapB(b -> b.charAt(0))).get();
    assertEquals(expectedResult, result);
}