Added some tests and fixed type issues with MetaDataModelFactoryTestCase