assertEquals( user, other );
}
@Test
public void combinedSave() {
Product product = new Product( 2, "product 2" );
User user = new User( 2, "user 2" );
userRepository.save( user, product );
closeSession();
openSession();
User otherUser = userRepository.getUserWithId( 2 );
assertNotNull( otherUser );
assertEquals( user, otherUser );
Product otherProduct = productRepository.getProductWithId( 2 );
assertNotNull( otherProduct );
assertEquals( product, otherProduct );
}