In your test you refer to "Utf8" but there's no UTF-8 in use here. You probably mean UTF-16? You could port Vector/ArrayManagement that I wrote when fixing ArrayList/Vector, but I see there are more existing tests for capacity of StringB*er