Changed test and added factories