public function testShouldUpdate()
{
// Arrage
$entity = m::mock(ActiveRecord::class . '[getDataMapper,getCollectionName,syncOriginalAttributes]');
$dataMapper = m::mock();
// Act
$entity->shouldReceive('getDataMapper')->andReturn($dataMapper);
$entity->shouldReceive('getCollectionName')->andReturn('mongolid');
$entity->shouldReceive('syncOriginalAttributes')->once();
$dataMapper->shouldReceive('update')->once()->with($entity, ['writeConcern' => new WriteConcern(1)])->andReturn(true);
// Assert
$this->assertTrue($entity->update());
}