@SuppressWarnings("unchecked")
@Test
public void testShortest() {

  assertEquals((Object) 'a', Parsers.shortest(isChar('a'), areChars("ab")).followedBy(Scanners.isChar('b')).parse("ab", mode));
  assertEquals((Object) 'a', Parsers.shortest(areChars("ab"), isChar('a')).followedBy(Scanners.isChar('b')).parse("ab", mode));
  assertEquals((Object) 'b', Parsers.shortest(areChars("ab"), areChars("abc")).followedBy(Scanners.isChar('c')).parse("abc", mode));
  assertEquals((Object) 'b', Parsers.shortest(areChars("abc"), areChars("ab")).followedBy(Scanners.isChar('c')).parse("abc", mode));
  assertEquals((Object) 'b', Parsers.shortest(Arrays.asList(areChars("abc"), areChars("ab")))
  .followedBy(Scanners.isChar('c')).parse("abc", mode));
  assertEquals("shortest", Parsers.shortest(isChar('a'), isChar('b')).toString());
}