Added test for cosine similarity