void () { final ElementPattern pattern = string().startsWith("abc"); assertFalse(pattern.accepts("")); assertTrue(pattern.accepts("abcd")); assertTrue(pattern.accepts("abc")); assertFalse(string().startsWith("abc").accepts(new Object())); }