@Test
public void testGetBusinessObjectFormatVersionChangeMessageVelocityContextMap()
{

    // Create a business object format key with values that require JSON and XML escaping.
    BusinessObjectFormatKey businessObjectFormatKey =
        new BusinessObjectFormatKey(BDEF_NAMESPACE + SUFFIX_UNESCAPED, BDEF_NAME + SUFFIX_UNESCAPED, FORMAT_USAGE_CODE + SUFFIX_UNESCAPED,
            FORMAT_FILE_TYPE_CODE + SUFFIX_UNESCAPED, FORMAT_VERSION_2);
    // Call the method under test.
    Map<String, Object> result = businessObjectFormatVersionChangeMessageBuilder.getNotificationMessageVelocityContextMap(
        new BusinessObjectFormatVersionChangeNotificationEvent(businessObjectFormatKey, String.valueOf(FORMAT_VERSION)));
    // Create an expected JSON escaped business object format key.
    BusinessObjectFormatKey expectedBusinessObjectFormatKeyWithJson =
        new BusinessObjectFormatKey(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_2);
    // Create an expected XML escaped business object format key.
    BusinessObjectFormatKey expectedBusinessObjectFormatKeyWithXml =
        new BusinessObjectFormatKey(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_2);
    // Validate the results.
    assertEquals(8, CollectionUtils.size(result));
    assertEquals(businessObjectFormatKey, result.get("businessObjectFormatKey"));
    assertEquals(expectedBusinessObjectFormatKeyWithJson, result.get("businessObjectFormatKeyWithJson"));
    assertEquals(expectedBusinessObjectFormatKeyWithXml, result.get("businessObjectFormatKeyWithXml"));
    assertEquals(FORMAT_VERSION_2, result.get("newBusinessObjectFormatVersion"));
    assertEquals(FORMAT_VERSION.toString(), result.get("oldBusinessObjectFormatVersion"));
    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"));
}