Using Contract Tests for reliable memory fakes

How to make sure that memory-based fakes really behave like the production implementations they replace