private void verifySerde(CloudBlobMetadata blobMetadata, String[] expectedFields, String[] unexpectedFields)
      throws JsonProcessingException {
    Map<String, String> propertyMap = blobMetadata.toMap();
    for (String fieldName : expectedFields) {
      assertTrue("Expected field " + fieldName, propertyMap.containsKey(fieldName));
    }
    for (String fieldName : unexpectedFields) {
      assertFalse("Unexpected field " + fieldName, propertyMap.containsKey(fieldName));
    }

    String serializedString = mapperObj.writeValueAsString(blobMetadata);
    CloudBlobMetadata deserBlobMetadata = mapperObj.readValue(serializedString, CloudBlobMetadata.class);
    assertEquals("Expected equality", blobMetadata, deserBlobMetadata);
  }
Verify that the correct fields are serialized, and that deserialization produces the same record.
@param blobMetadata the {@link CloudBlobMetadata} to verify.
@param expectedFields the fields expected to be serialized.
@param unexpectedFields the fields expected not to be serialized.
@throws JsonProcessingException
ambry-cloud/src/test/java/com/github/ambry/cloud/CloudBlobMetadataTest.java