### Question:
WorkflowPackageManagerImpl implements WorkflowPackageManager { public final void delete(final ResourceResolver resourceResolver, final String path) throws RepositoryException { final Resource resource = resourceResolver.getResource(path); if (resource == null) { log.error("Requesting to delete a non-existent Workflow Package [ {} ]", path); return; } final Node node = resource.adaptTo(Node.class); if (node != null) { node.remove(); node.getSession().save(); } else { log.error("Trying to delete a wf resource [ {} ] that does not resolve to a node.", resource.getPath()); } }  final Page create(final ResourceResolver resourceResolver,
                             final String name, final String... paths); final Page create(final ResourceResolver resourceResolver, String bucketSegment,
                             final String name, final String... paths); final List<String> getPaths(final ResourceResolver resourceResolver,
                                       final String path); final List<String> getPaths(final ResourceResolver resourceResolver,
                                       final String path, final String[] nodeTypes); final void delete(final ResourceResolver resourceResolver, final String path); final boolean isWorkflowPackage(final ResourceResolver resourceResolver, final String path); @Property(label = "Workflow Package Types",
            description = "Node Types allowed by the WF Package. Default: cq:Page, cq:PageContent, dam:Asset",
            value = { "cq:Page", "cq:PageContent", "dam:Asset" })
    static final String PROP_WF_PACKAGE_TYPES; }### Answer:
@Test public void testDelete() throws Exception { wpm.delete(resourceResolver, WORKFLOW_PACKAGE_PATH); verify(workflowPackageNode, times(1)).remove(); verify(session, times(1)).save(); }