fixed apartment factory and added test for user association