CharacterReader { boolean containsIgnoreCase(String seq) { String loScan = seq.toLowerCase(Locale.ENGLISH); String hiScan = seq.toUpperCase(Locale.ENGLISH); return (nextIndexOf(loScan) > -1) || (nextIndexOf(hiScan) > -1); } CharacterReader(String input); @Override String toString();  }
@Test public void containsIgnoreCase() { CharacterReader r = new CharacterReader("One TWO three"); assertTrue(r.containsIgnoreCase("two")); assertTrue(r.containsIgnoreCase("three")); assertFalse(r.containsIgnoreCase("one")); }