Test against `Mapping` instead of `dict`.