Tests for Factory