### Question:
WorkflowPackageManagerImpl implements WorkflowPackageManager { public final boolean isWorkflowPackage(final ResourceResolver resourceResolver, final String path) { final PageManager pageManager = resourceResolver.adaptTo(PageManager.class); final Page workflowPackagesPage = pageManager.getPage(path); if (workflowPackagesPage == null) { return false; } final Resource contentResource = workflowPackagesPage.getContentResource(); if (contentResource == null) { return false; } if (!contentResource.isResourceType(WORKFLOW_PAGE_RESOURCE_TYPE)) { return false; } if (contentResource.getChild(NN_VLT_DEFINITION) == null) { return false; } return true; }  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 testIsWorkflowPackage() throws Exception { assertTrue(wpm.isWorkflowPackage(resourceResolver, WORKFLOW_PACKAGE_PATH)); }
@Test public void testIsWorkflowPackage_NormalPage() throws Exception { assertFalse(wpm.isWorkflowPackage(resourceResolver, NORMAL_PAGE_PATH)); }
@Test public void testIsWorkflowPackage_workflowPackagesPageIsNull() { assertFalse(wpm.isWorkflowPackage(resourceResolver, null)); }
@Test public void testIsWorkflowPackage_vltDefinitionIsNull() { when(contentResource.getChild("vlt:definition")).thenReturn(null); assertFalse(wpm.isWorkflowPackage(resourceResolver, WORKFLOW_PACKAGE_PATH)); }
@Test public void testIsWorkflowPackage_contentResourceIsNull() { when(workflowPackagePage.getContentResource()).thenReturn(null); assertFalse(wpm.isWorkflowPackage(resourceResolver, WORKFLOW_PACKAGE_PATH)); when(normalPage.getContentResource()).thenReturn(null); assertFalse(wpm.isWorkflowPackage(resourceResolver, NORMAL_PAGE_PATH)); }