int numInsert = 3;
int numUpdate = 1;
Session session = openSession();
session.beginTransaction();
Helicopter helicopter = helicopter( "H_tmp" );
session.persist( helicopter );
for ( int i = 0; i < numInsert; i++ ) {
session.persist( helicopter( "H_" + i ) );
}
helicopter.setName( "H_" + numInsert );
session.getTransaction().commit();
session.close();
Assertions.assertThat( LeakingMongoDBDialect.queueSize ).isEqualTo( numUpdate + ( numInsert + 1 ) );
}