updated user tests to use api's for dependent entities and use factory implementation