@Test
public final void testOnUpdateProperties()
{

    Map<QName, Serializable> fromProperties = new HashMap<QName, Serializable>();
    fromProperties.put(ContentModel.PROP_CREATED, "created");
    fromProperties.put(ContentModel.PROP_CREATOR, "creator");
    fromProperties.put(ContentModel.PROP_CONTENT, "content");
    fromProperties.put(ContentModel.PROP_LOCATION, "location");
    fromProperties.put(ContentModel.PROP_MOBILE, "mobile");
    fromProperties.put(ContentModel.PROP_HITS, "hits");
    fromProperties.put(ContentModel.PROP_TITLE, "title");
    
    Map<QName, Serializable> toProperties = new HashMap<QName, Serializable>(fromProperties);
    toProperties.put(ContentModel.PROP_AUTHOR, "AUTHOR");
    toProperties.put(ContentModel.PROP_ADDRESSEE, "ADDRESSEE");
    toProperties.remove(ContentModel.PROP_CREATED);
    toProperties.remove(ContentModel.PROP_CREATOR);
    toProperties.remove(ContentModel.PROP_CONTENT);
    toProperties.put(ContentModel.PROP_LOCATION, "LOCATION");
    
    nodeChange.onUpdateProperties(content1, fromProperties, toProperties);
    
    Map<String, Serializable> auditMap = nodeChange.getAuditData(false);
    assertStandardData(auditMap, "updateNodeProperties", "updateNodeProperties");
    
    assertEquals(1, ((Map<?,?>)auditMap.get("properties/from")).size());
    assertEquals("location", ((Map<?,?>)auditMap.get("properties/from")).get(ContentModel.PROP_LOCATION));
    assertEquals("location", auditMap.get("properties/from/cm:location"));
    assertEquals(1, ((Map<?,?>)auditMap.get("properties/to")).size());
    assertEquals("LOCATION", ((Map<?,?>)auditMap.get("properties/to")).get(ContentModel.PROP_LOCATION));
    assertEquals("LOCATION", auditMap.get("properties/to/cm:location"));
    assertEquals(2, ((Map<?,?>)auditMap.get("properties/add")).size());
    assertEquals("AUTHOR", ((Map<?,?>)auditMap.get("properties/add")).get(ContentModel.PROP_AUTHOR));
    assertEquals("ADDRESSEE", ((Map<?,?>)auditMap.get("properties/add")).get(ContentModel.PROP_ADDRESSEE));
    assertEquals("AUTHOR", auditMap.get("properties/add/cm:author"));
    assertEquals("ADDRESSEE", auditMap.get("properties/add/cm:addressee"));
    assertEquals(3, ((Map<?,?>)auditMap.get("properties/delete")).size());
    assertEquals("created", ((Map<?,?>)auditMap.get("properties/delete")).get(ContentModel.PROP_CREATED));
    assertEquals("creator", ((Map<?,?>)auditMap.get("properties/delete")).get(ContentModel.PROP_CREATOR));
    assertEquals("content", ((Map<?,?>)auditMap.get("properties/delete")).get(ContentModel.PROP_CONTENT));
    assertEquals("created", auditMap.get("properties/delete/cm:created"));
    assertEquals("creator", auditMap.get("properties/delete/cm:creator"));
    assertEquals("content", auditMap.get("properties/delete/cm:content"));
}