### Question:
CharacterReader { public String consumeToAny(final char... chars) { bufferUp(); int pos = bufPos; final int start = pos; final int remaining = bufLength; final char[] val = charBuf; final int charLen = chars.length; int i; OUTER: while (pos < remaining) { for (i = 0; i < charLen; i++) { if (val[pos] == chars[i]) break OUTER; } pos++; } bufPos = pos; return pos > start ? cacheString(charBuf, stringCache, start, pos -start) : ""; } CharacterReader(Reader input, int sz);  CharacterReader(Reader input);  CharacterReader(String input); int pos(); boolean isEmpty(); char current(); void advance(); String consumeTo(char c); String consumeToAny(final char... chars); @Override String toString();  }### Answer:
@Test public void consumeToAny() { CharacterReader r = new CharacterReader("One &bar; qux"); assertEquals("One ", r.consumeToAny('&', ';')); assertTrue(r.matches('&')); assertTrue(r.matches("&bar;")); assertEquals('&', r.consume()); assertEquals("bar", r.consumeToAny('&', ';')); assertEquals(';', r.consume()); assertEquals(" qux", r.consumeToAny('&', ';')); }