### Question:
PackageHelperImpl implements PackageHelper { public JcrPackage createPackage(final Collection<Resource> resources, final Session session, final String groupName, final String name, String version, final ConflictResolution conflictResolution, final Map<String, String> packageDefinitionProperties) throws IOException, RepositoryException { final List<PathFilterSet> pathFilterSets = new ArrayList<PathFilterSet>(); for (final Resource resource : resources) { pathFilterSets.add(new PathFilterSet(resource.getPath())); } return this.createPackageFromPathFilterSets(pathFilterSets, session, groupName, name, version, conflictResolution, packageDefinitionProperties); }  void addThumbnail(final JcrPackage jcrPackage, Resource thumbnailResource); @SuppressWarnings("squid:S3776") Version getNextVersion(final JcrPackageManager jcrPackageManager,
            final String groupName, final String name,
            final String version); void removePackage(final JcrPackageManager jcrPackageManager,
            final String groupName, final String name,
            final String version); JcrPackage createPackage(final Collection<Resource> resources, final Session session,
            final String groupName, final String name, String version,
            final ConflictResolution conflictResolution,
            final Map<String, String> packageDefinitionProperties); @Override JcrPackage createPackageForPaths(final Collection<String> paths, final Session session,
            final String groupName, String name, final String version,
            final ConflictResolution conflictResolution,
            Map<String, String> packageDefinitionProperties); JcrPackage createPackageFromPathFilterSets(final Collection<PathFilterSet> pathFilterSets,
            final Session session,
            final String groupName, final String name, String version,
            final ConflictResolution conflictResolution,
            final Map<String, String> packageDefinitionProperties); List<String> getContents(final JcrPackage jcrPackage); String getSuccessJSON(final JcrPackage jcrPackage); String getPreviewJSON(final Collection<Resource> resources); String getPreviewJSONForPaths(Collection<String> paths); String getPathFilterSetPreviewJSON(final Collection<PathFilterSet> pathFilterSets); String getErrorJSON(final String msg);  }### Answer:
@Test public void testCreatePackage() throws Exception { Map<String, String> properties = new HashMap<String, String>(); Set<Resource> resources = new HashSet<Resource>(); when(jcrPackageManager.create(packageGroup, packageName, packageOneVersion)).thenReturn(packageOne); packageHelper.createPackage(resources, session, packageGroup, packageName, packageOneVersion, PackageHelper.ConflictResolution.None, properties); verify(session, times(1)).save(); }