@Test
public void testListPackages() throws IOException, PackageException, RepositoryException {

    assertTrue("initially the packages set is empty", packMgr.listPackages().isEmpty());
    packMgr.upload(getStream("/test-packages/tmp.zip"), false);
    assertEquals("package list contains 1 element", 1, packMgr.listPackages().size());
    JcrPackage pkg = packMgr.listPackages().get(0);
    assertEquals("contains new package", TMP_PACKAGE_ID, pkg.getDefinition().getId());
}