@Test
public void testGetBusinessObjectDefinitionDescriptionSuggestionChangeMessageVelocityContextMap()
{

    // Create a business object definition description suggestion key with values that require JSON and XML escaping.
    BusinessObjectDefinitionDescriptionSuggestionKey businessObjectDefinitionDescriptionSuggestionKey =
        new BusinessObjectDefinitionDescriptionSuggestionKey(BDEF_NAMESPACE + SUFFIX_UNESCAPED, BDEF_NAME + SUFFIX_UNESCAPED, USER_ID + SUFFIX_UNESCAPED);
    // Create a business object definition description suggestion with values that require JSON and XML escaping.
    BusinessObjectDefinitionDescriptionSuggestion businessObjectDefinitionDescriptionSuggestion =
        new BusinessObjectDefinitionDescriptionSuggestion(ID, businessObjectDefinitionDescriptionSuggestionKey, DESCRIPTION_SUGGESTION + SUFFIX_UNESCAPED,
            BDEF_DESCRIPTION_SUGGESTION_STATUS + SUFFIX_UNESCAPED, USER_ID + SUFFIX_UNESCAPED, CREATED_ON);
    // Create and persist a namespace entity.
    NamespaceEntity namespaceEntity = namespaceDaoTestHelper.createNamespaceEntity(businessObjectDefinitionDescriptionSuggestionKey.getNamespace());
    // Call the method under test.
    Map<String, Object> result = businessObjectDefinitionDescriptionSuggestionChangeMessageBuilder.getNotificationMessageVelocityContextMap(
        new BusinessObjectDefinitionDescriptionSuggestionChangeNotificationEvent(businessObjectDefinitionDescriptionSuggestion,
            USER_ID_2 + SUFFIX_UNESCAPED, UPDATED_ON, namespaceEntity.getCode()));
    // Create an expected JSON escaped business object definition description suggestion key.
    BusinessObjectDefinitionDescriptionSuggestionKey expectedBusinessObjectDefinitionDescriptionSuggestionKeyWithJson =
        new BusinessObjectDefinitionDescriptionSuggestionKey(BDEF_NAMESPACE + SUFFIX_ESCAPED_JSON, BDEF_NAME + SUFFIX_ESCAPED_JSON,
            USER_ID + SUFFIX_ESCAPED_JSON);
    // Create an expected JSON escaped business object definition description suggestion key.
    BusinessObjectDefinitionDescriptionSuggestion expectedBusinessObjectDefinitionDescriptionSuggestionWithJson =
        new BusinessObjectDefinitionDescriptionSuggestion(ID, expectedBusinessObjectDefinitionDescriptionSuggestionKeyWithJson,
            DESCRIPTION_SUGGESTION + SUFFIX_ESCAPED_JSON, BDEF_DESCRIPTION_SUGGESTION_STATUS + SUFFIX_ESCAPED_JSON, USER_ID + SUFFIX_ESCAPED_JSON,
            CREATED_ON);
    // Create an expected XML escaped business object definition description suggestion key.
    BusinessObjectDefinitionDescriptionSuggestionKey expectedBusinessObjectDefinitionDescriptionSuggestionKeyWithXml =
        new BusinessObjectDefinitionDescriptionSuggestionKey(BDEF_NAMESPACE + SUFFIX_ESCAPED_XML, BDEF_NAME + SUFFIX_ESCAPED_XML,
            USER_ID + SUFFIX_ESCAPED_XML);
    // Create an expected XML escaped business object definition description suggestion key.
    BusinessObjectDefinitionDescriptionSuggestion expectedBusinessObjectDefinitionDescriptionSuggestionWithXml =
        new BusinessObjectDefinitionDescriptionSuggestion(ID, expectedBusinessObjectDefinitionDescriptionSuggestionKeyWithXml,
            DESCRIPTION_SUGGESTION + SUFFIX_ESCAPED_XML, BDEF_DESCRIPTION_SUGGESTION_STATUS + SUFFIX_ESCAPED_XML, USER_ID + SUFFIX_ESCAPED_XML, CREATED_ON);
    // Create expected notification lists.
    List<String> expectedNotificationList = Lists.newArrayList(USER_ID + SUFFIX_UNESCAPED);
    List<String> expectedNotificationListWithJson = Lists.newArrayList(USER_ID + SUFFIX_ESCAPED_JSON);
    List<String> expectedNotificationListWithXml = Lists.newArrayList(USER_ID + SUFFIX_ESCAPED_XML);
    // Validate the results.
    assertEquals(16, CollectionUtils.size(result));
    assertEquals(businessObjectDefinitionDescriptionSuggestion, result.get("businessObjectDefinitionDescriptionSuggestion"));
    assertEquals(expectedBusinessObjectDefinitionDescriptionSuggestionWithJson, result.get("businessObjectDefinitionDescriptionSuggestionWithJson"));
    assertEquals(expectedBusinessObjectDefinitionDescriptionSuggestionWithXml, result.get("businessObjectDefinitionDescriptionSuggestionWithXml"));
    assertEquals(businessObjectDefinitionDescriptionSuggestionKey, result.get("businessObjectDefinitionDescriptionSuggestionKey"));
    assertEquals(expectedBusinessObjectDefinitionDescriptionSuggestionKeyWithJson, result.get("businessObjectDefinitionDescriptionSuggestionKeyWithJson"));
    assertEquals(expectedBusinessObjectDefinitionDescriptionSuggestionKeyWithXml, result.get("businessObjectDefinitionDescriptionSuggestionKeyWithXml"));
    assertEquals(USER_ID_2 + SUFFIX_UNESCAPED, result.get("lastUpdatedByUserId"));
    assertEquals(USER_ID_2 + SUFFIX_ESCAPED_JSON, result.get("lastUpdatedByUserIdWithJson"));
    assertEquals(USER_ID_2 + SUFFIX_ESCAPED_XML, result.get("lastUpdatedByUserIdWithXml"));
    assertEquals(UPDATED_ON, result.get("lastUpdatedOn"));
    assertEquals(expectedNotificationList, result.get("notificationList"));
    assertEquals(expectedNotificationListWithJson, result.get("notificationListWithJson"));
    assertEquals(expectedNotificationListWithXml, result.get("notificationListWithXml"));
    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"));
}