Adding contract tests for Similarity interface to Context and Value