public function testShouldGetFirstOrNewAndReturnNewModel()
{
// Arrage
$entity = m::mock(ActiveRecord::class . '[getDataMapper]');
$this->setProtected($entity, 'collection', 'mongolid');
$id = 123;
$dataMapper = m::mock();
// Act
Ioc::instance(get_class($entity), $entity);
$entity->shouldReceive('getDataMapper')->andReturn($dataMapper);
$dataMapper->shouldReceive('first')->once()->with($id)->andReturn(null);
// Assert
$this->assertNotEquals($entity, $entity->firstOrNew($id));
}