void () { final ElementPattern pattern = not(or(string().endsWith("abc"), string().startsWith("abc"))); assertTrue(pattern.accepts("")); assertTrue(pattern.accepts("xxx")); assertFalse(pattern.accepts("abcd")); assertTrue(pattern.accepts("dabcd")); assertFalse(pattern.accepts("abc")); assertFalse(pattern.accepts("abcdabc")); assertFalse(pattern.accepts("abcdab")); }