public <V> Match<V> map(Function<T, V> mapper) {
        if (matchAny) {
            return any();
        } else if (value == null) {
            return negation ? ifNotNull() : ifNull();
        } else {
            return negation ? ifNotValue(mapper.apply(value)) : ifValue(mapper.apply(value));
        }
    }
@Test
    public void testMap() {
        Match<String> m1 = Match.ifNull();
        assertEquals(m1.map(s -> "bar"), Match.ifNull());
        Match<String> m2 = Match.ifValue("foo");
        Match<String> m3 = m2.map(s -> "bar");
        assertTrue(m3.matches("bar"));
    }