@Test
public void testUpdateLength() throws IOException {

  Mockito.mock(DataOutputStream.class);
  int kvLength = 0;
  for (int i = 0; i < inputArraySize; i++) {
    key.reset(inputArray[i].key);
    value.reset(inputArray[i].value);
    serializer.updateLength(key, value);
    // verify whether the size increase
    Assert.assertTrue(key.length + value.length > kvLength);
    kvLength = key.length + value.length;
  }
}