AccessAuditor implements InitializingBean, 

        BeforeDeleteNodePolicy, OnAddAspectPolicy, OnCreateNodePolicy, OnMoveNodePolicy,
        OnRemoveAspectPolicy, OnUpdatePropertiesPolicy,
        
        OnContentReadPolicy, OnContentUpdatePolicy,
        
        OnCreateVersionPolicy,
        
        OnCopyCompletePolicy,
        
        OnCheckOut, OnCheckIn, OnCancelCheckOut { public void onCancelCheckOut(NodeRef nodeRef) { if (auditEnabled()) { getNodeChange(nodeRef).onCancelCheckOut(nodeRef); } }  void setProperties(Properties properties); void setPolicyComponent(PolicyComponent policyComponent); void setAuditComponent(AuditComponent auditComponent); void setTransactionService(TransactionService transactionService); void setNamespaceService(NamespaceService namespaceService); void setNodeInfoFactory(NodeInfoFactory nodeInfoFactory); void afterPropertiesSet(); @Override void beforeDeleteNode(NodeRef nodeRef); @Override void onCreateNode(ChildAssociationRef childAssocRef); @Override void onMoveNode(ChildAssociationRef fromChildAssocRef,
            ChildAssociationRef toChildAssocRef); @Override void onUpdateProperties(NodeRef nodeRef,
            Map<QName, Serializable> fromProperties, Map<QName, Serializable> toProperties); @Override void onRemoveAspect(NodeRef nodeRef, QName aspect); @Override void onAddAspect(NodeRef nodeRef, QName aspect); @Override void onContentUpdate(NodeRef nodeRef, boolean newContent); @Override void onContentRead(NodeRef nodeRef); @Override void onCreateVersion(QName classRef, NodeRef nodeRef,
            Map<String, Serializable> versionProperties, PolicyScope nodeDetails); void onCopyComplete(QName classRef, NodeRef sourceNodeRef, NodeRef targetNodeRef,
            boolean copyToNewNode, Map<NodeRef, NodeRef> copyMap); void onCheckOut(NodeRef workingCopy); void onCheckIn(NodeRef nodeRef); void onCancelCheckOut(NodeRef nodeRef);  }
@Test public final void testOnCancelCheckOut() throws Exception { workingCopyNodeRef = serviceRegistry.getCheckOutCheckInService().checkout(content1); txn.commit(); txn = null; tearDown(); setUp(); serviceRegistry.getCheckOutCheckInService().cancelCheckout(workingCopyNodeRef); txn.commit(); txn = null; assertEquals(2, auditMapList.size()); boolean origIn0 = ((String)auditMapList.get(0).get("path")).endsWith("cm:content1"); Map<String, Serializable> origMap = auditMapList.get(origIn0 ? 0 : 1); Map<String, Serializable> workMap = auditMapList.get(origIn0 ? 1 : 0); assertEquals("DELETE", workMap.get("action")); assertContains("deleteNode", workMap.get("sub-actions")); assertTrue("Expected working copy", ((String)workMap.get("path")).endsWith("(Working Copy)") && ((String)workMap.get("path")).startsWith("/cm:homeFolder/cm:folder1/")); assertEquals("cm:content", workMap.get("type")); assertEquals("CANCEL CHECK OUT", origMap.get("action")); assertContains("deleteNodeAspect", origMap.get("sub-actions")); assertContains("cancelCheckOut", origMap.get("sub-actions")); assertEquals("/cm:homeFolder/cm:folder1/cm:content1", origMap.get("path")); assertEquals("cm:content", origMap.get("type")); }