public static void assertNodeNotExistById ( final Session session , final String itemId ) throws RepositoryException { try { session . getNodeByIdentifier ( itemId ) ; fail ( "ItemNotFoundException expected" ) ; } catch ( final ItemNotFoundException e ) { // NOSONAR // this was expected } }
Asserts that an item identified by it s unique id is not found in the repository session .