private void assertString(String expected) throws CharacterCodingException {
  byte[] input=expected.getBytes(StandardCharsets.UTF_8);
  int i=0;
  int j=0;
  while (i < input.length) {
    while (!feeder.isFull() && i < input.length) {
      feeder.feed(input[i]);
      ++i;
    }
    while (feeder.hasInput()) {
      assertEquals(expected.charAt(j),feeder.nextInput());
      ++j;
    }
  }
  assertEquals(expected.length(),j);
  assertFalse(feeder.hasInput());
  assertFalse(feeder.isFull());
}

private void assertString ( String expected ) throws CharacterCodingException { byte [ ] input = expected . getBytes ( StandardCharsets . UTF_8 ) ; int i = 0 ; int j = 0 ; while ( i < input . length ) { while ( ! feeder . isFull ( ) && i < input . length ) { feeder . feed ( input [ i ] ) ; ++ i ; } while ( feeder . hasInput ( ) ) { assertEquals ( expected . charAt ( j ) , feeder . nextInput ( ) ) ; ++ j ; } } assertEquals ( expected . length ( ) , j ) ; assertFalse ( feeder . hasInput ( ) ) ; assertFalse ( feeder . isFull ( ) ) ; }
test if a given string can be decoded correctly
