@Test
public void testGetPackageRootWithAdminPendingChanges() throws Exception {

    admin.getRootNode().addNode("testNode");
    JcrPackageManagerImpl jcrPackageManager = new JcrPackageManagerImpl(admin, new String[0]);
    try {
        jcrPackageManager.getPackageRoot(false);
        fail("transient modifications must fail the package root creation.");
    } catch (RepositoryException e) {
        // success
    }
}