Created test for AbstractFactory