public function matches($argument)
{
if (get_class($this->expected) !== get_class($argument)) {
return false;
}
$actualAttributes = Arrays::filterByAllowedKeys($argument->attributes(), $this->expected->getFields());
return $this->expectedAttributes == $actualAttributes;
}