Added method to CoreMock, use Object.keys() for iterating over object keys.