Add Unit tests for matchingNibbleLength and move to ByteUtil