@Test
public void testCoding() {

    final StringBuilder buf = new StringBuilder();
    PercentCodec.encode(buf, "blah!", StandardCharsets.UTF_8);
    PercentCodec.encode(buf, " ~ ", StandardCharsets.UTF_8);
    PercentCodec.encode(buf, "huh?", StandardCharsets.UTF_8);
    MatcherAssert.assertThat(buf.toString(), CoreMatchers.equalTo("blah%21%20~%20huh%3F"));
}