Making tests for factories simpler