Updated test for SessionFactory