test for correct bytebuffer folding