fix an incorrect unit test
improve the design of SegmentalByteBuffer