link contract patterns and unit tests