@Test
public void testGetStorageUnitStatusChangeMessageVelocityContextMap()
{

    // Create a business object data key with values that require JSON and XML escaping.
    BusinessObjectDataKey businessObjectDataKey =
        new BusinessObjectDataKey(BDEF_NAMESPACE + SUFFIX_UNESCAPED, BDEF_NAME + SUFFIX_UNESCAPED, FORMAT_USAGE_CODE + SUFFIX_UNESCAPED,
            FORMAT_FILE_TYPE_CODE + SUFFIX_UNESCAPED, FORMAT_VERSION, PARTITION_VALUE + SUFFIX_UNESCAPED, Lists
            .newArrayList(SUBPARTITION_VALUES.get(0) + SUFFIX_UNESCAPED, SUBPARTITION_VALUES.get(1) + SUFFIX_UNESCAPED,
                SUBPARTITION_VALUES.get(2) + SUFFIX_UNESCAPED, SUBPARTITION_VALUES.get(3) + SUFFIX_UNESCAPED), DATA_VERSION);
    // Call the method under test.
    Map<String, Object> result = storageUnitStatusChangeMessageBuilder.getNotificationMessageVelocityContextMap(
        new StorageUnitStatusChangeNotificationEvent(businessObjectDataKey, STORAGE_NAME + SUFFIX_UNESCAPED, STORAGE_UNIT_STATUS_2 + SUFFIX_UNESCAPED,
            STORAGE_UNIT_STATUS + SUFFIX_UNESCAPED));
    // Create an expected JSON escaped business object data key.
    BusinessObjectDataKey expectedBusinessObjectDataKeyWithJson =
        new BusinessObjectDataKey(BDEF_NAMESPACE + SUFFIX_ESCAPED_JSON, BDEF_NAME + SUFFIX_ESCAPED_JSON, FORMAT_USAGE_CODE + SUFFIX_ESCAPED_JSON,
            FORMAT_FILE_TYPE_CODE + SUFFIX_ESCAPED_JSON, FORMAT_VERSION, PARTITION_VALUE + SUFFIX_ESCAPED_JSON, Lists
            .newArrayList(SUBPARTITION_VALUES.get(0) + SUFFIX_ESCAPED_JSON, SUBPARTITION_VALUES.get(1) + SUFFIX_ESCAPED_JSON,
                SUBPARTITION_VALUES.get(2) + SUFFIX_ESCAPED_JSON, SUBPARTITION_VALUES.get(3) + SUFFIX_ESCAPED_JSON), DATA_VERSION);
    // Create an expected XML escaped business object data key.
    BusinessObjectDataKey expectedBusinessObjectDataKeyWithXml =
        new BusinessObjectDataKey(BDEF_NAMESPACE + SUFFIX_ESCAPED_XML, BDEF_NAME + SUFFIX_ESCAPED_XML, FORMAT_USAGE_CODE + SUFFIX_ESCAPED_XML,
            FORMAT_FILE_TYPE_CODE + SUFFIX_ESCAPED_XML, FORMAT_VERSION, PARTITION_VALUE + SUFFIX_ESCAPED_XML, Lists
            .newArrayList(SUBPARTITION_VALUES.get(0) + SUFFIX_ESCAPED_XML, SUBPARTITION_VALUES.get(1) + SUFFIX_ESCAPED_XML,
                SUBPARTITION_VALUES.get(2) + SUFFIX_ESCAPED_XML, SUBPARTITION_VALUES.get(3) + SUFFIX_ESCAPED_XML), DATA_VERSION);
    // Validate the results.
    assertEquals(15, CollectionUtils.size(result));
    assertEquals(businessObjectDataKey, result.get("businessObjectDataKey"));
    assertEquals(expectedBusinessObjectDataKeyWithJson, result.get("businessObjectDataKeyWithJson"));
    assertEquals(expectedBusinessObjectDataKeyWithXml, result.get("businessObjectDataKeyWithXml"));
    assertEquals(STORAGE_NAME + SUFFIX_UNESCAPED, result.get("storageName"));
    assertEquals(STORAGE_NAME + SUFFIX_ESCAPED_JSON, result.get("storageNameWithJson"));
    assertEquals(STORAGE_NAME + SUFFIX_ESCAPED_XML, result.get("storageNameWithXml"));
    assertEquals(STORAGE_UNIT_STATUS_2 + SUFFIX_UNESCAPED, result.get("newStorageUnitStatus"));
    assertEquals(STORAGE_UNIT_STATUS_2 + SUFFIX_ESCAPED_JSON, result.get("newStorageUnitStatusWithJson"));
    assertEquals(STORAGE_UNIT_STATUS_2 + SUFFIX_ESCAPED_XML, result.get("newStorageUnitStatusWithXml"));
    assertEquals(STORAGE_UNIT_STATUS + SUFFIX_UNESCAPED, result.get("oldStorageUnitStatus"));
    assertEquals(STORAGE_UNIT_STATUS + SUFFIX_ESCAPED_JSON, result.get("oldStorageUnitStatusWithJson"));
    assertEquals(STORAGE_UNIT_STATUS + SUFFIX_ESCAPED_XML, result.get("oldStorageUnitStatusWithXml"));
    assertEquals(BDEF_NAMESPACE + SUFFIX_UNESCAPED, result.get("namespace"));
    assertEquals(BDEF_NAMESPACE + SUFFIX_ESCAPED_JSON, result.get("namespaceWithJson"));
    assertEquals(BDEF_NAMESPACE + SUFFIX_ESCAPED_XML, result.get("namespaceWithXml"));
}