// then
transaction = session.beginTransaction();
bob = (User) session.get( User.class, "user-1" );
assertThat( bob.getName() ).isEqualTo( "Alice" );
assertThat( bob.getProjects() ).onProperty( "name" ).containsOnly( "OGM", "Search" );
transaction.commit();
}
@Test(expected = StaleObjectStateException.class)
public void concurrentUpdateToAssociationShouldCauseException() throws Exception {
Animal animal = createAndPersistAnimal();