}
@Test
public void testRolledBackIdentifiersOnUnusualDocumentId() {
SearchFactoryImplementor searchFactoryImpl = getSearchFactoryImpl();
MockErrorHandler errorHandler = (MockErrorHandler) searchFactoryImpl.getErrorHandler();
Session s = getSessionFactory().openSession();
s.getTransaction().begin();
s.persist( new PersonWithBrokenSocialSecurityNumber( Long.valueOf( 2 ), "This guy is unaffected by identifier rollback" ) );
s.getTransaction().commit();
s.close();
s = getSessionFactory().openSession();
s.getTransaction().begin();
PersonWithBrokenSocialSecurityNumber entity = (PersonWithBrokenSocialSecurityNumber) s.get( PersonWithBrokenSocialSecurityNumber.class, Long.valueOf( 2 ) );
Assert.assertNotNull( entity );
s.delete( entity );
s.getTransaction().commit();
s.close();
Assert.assertNull( "unexpected exception detected", errorHandler.getLastException() );
List<LuceneWork> processedQueue = LeakingLuceneBackend.getLastProcessedQueue();
Assert.assertEquals( 1, processedQueue.size() );
LuceneWork luceneWork = processedQueue.get( 0 );
Assert.assertEquals( "100", luceneWork.getIdInString() );
}