added tests for each entity's factory function