Adding tests for factories