@Test
public void test1ByteEncodings() {

    StringBuilder sb = new StringBuilder();
    for (int i=0; i<100; i++) {
        sb.append((char)i);
    }
    String result = ClassFileNameHandler.shortenPathComponent(sb.toString(), 5);
    Assert.assertEquals(95, result.getBytes(UTF8).length);
    Assert.assertEquals(95, result.length());
}