}
@Test
public void testSubArchiveExtract() throws IOException, RepositoryException, ConfigurationException {
ZipArchive archive = new ZipArchive(getTempFile("testpackages/tmp_with_thumbnail.zip"));
archive.open(true);
Node rootNode = admin.getRootNode();
Node tmpNode = rootNode.addNode("tmp");
Node fileNode = tmpNode.addNode("package.zip", "nt:file");
Node contentNode = fileNode.addNode("jcr:content", "nt:resource");
contentNode.setProperty("jcr:data", "");
contentNode.setProperty("jcr:lastModified", 0);
contentNode.addMixin("vlt:Package");
Node defNode = contentNode.addNode("vlt:definition", "vlt:PackageDefinition");
ImportOptions opts = getDefaultOptions();
Archive subArchive = archive.getSubArchive("META-INF/vault/definition", true);
DefaultWorkspaceFilter filter = new DefaultWorkspaceFilter();
filter.add(new PathFilterSet(defNode.getPath()));
Importer importer = new Importer(opts);