add tests for factories