Fix error

Fix error of Similarity, add test for two identical types. Keep the test
sample