Session testSession = null;
try {
testSession = (Session) helper.getReadWriteSession();
// removal of the locked node is a alteration of the parent, which
// isn't locked -> must succeed.
testSession.removeItem(nPath);
testSession.save();
} finally {
if (testSession != null) {
testSession.logout();
}