contentPaths.add("/content/bar");
final String packagePath = "/etc/packages/acs-commons/test.zip";
final Resource packageResource = mock(Resource.class);
final Node packageNode = mock(Node.class);
final JcrPackage jcrPackage = mock(JcrPackage.class);
final Node jcrPackageNode = mock(Node.class);
final JcrPackageDefinition jcrPackageDefinition = mock(JcrPackageDefinition.class);
final Resource jcrPackageJcrContent = mock(Resource.class);
final Resource contentResource1 = mock(Resource.class);
final Resource contentResource2 = mock(Resource.class);
final Node contentNode1 = mock(Node.class);
final Node contentNode2 = mock(Node.class);
final String[] paths = new String[] { packagePath };
final Map<String, Object> map = new HashMap<String, Object>();
map.put("paths", paths);
final Event event = new Event("MOCK", map);
when(adminResourceResolver.getResource(packagePath)).thenReturn(packageResource);
when(packageResource.adaptTo(Node.class)).thenReturn(packageNode);
when(packaging.open(packageNode, false)).thenReturn(jcrPackage);
when(packageHelper.getContents(jcrPackage)).thenReturn(contentPaths);
when(jcrPackage.getDefinition()).thenReturn(jcrPackageDefinition);
when(jcrPackageDefinition.getId()).thenReturn(mock(PackageId.class));
when(jcrPackage.getNode()).thenReturn(jcrPackageNode);
when(jcrPackageNode.getPath()).thenReturn(packagePath);
when(packageResource.getChild("jcr:content")).thenReturn(jcrPackageJcrContent);
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(JcrConstants.JCR_LASTMODIFIED, calendar);