@Test
public void checksHexCharacters() {

    String str = "%20%23%a0%ag";
    assertTrue(checkHexCharacters(str, 0));
    assertFalse(checkHexCharacters(str, 1));
    assertTrue(checkHexCharacters(str, 3));
    assertTrue(checkHexCharacters(str, 6));
    assertFalse(checkHexCharacters(str, 9));
    assertFalse(checkHexCharacters(str, 11));
}