Implemented abstract factory class and supporting unit test.