### Question:
PersonalisedSimilarityCalculator { public static double getPersonalisedSimilarity(String user, ArrayList<String> friendsArrayList, HashSet<String> friends, HashMap<String, HashMap<Integer, ArrayList<Long>>> userTagTimes) { HashSet<String> intersectedUsers = new HashSet<String>(friendsArrayList); intersectedUsers.retainAll(friends); double simScore = findSumOfSimilarityScore(user, new ArrayList<String>(intersectedUsers), userTagTimes); return simScore; }  static double getPersonalisedSimilarity(String user, ArrayList<String> friendsArrayList, HashSet<String> friends, HashMap<String, 
                                                              HashMap<Integer, ArrayList<Long>>> userTagTimes);  }### Answer:
@Test public void getPersonalisedSimilarityTest() { HashMap<String, Vector> userTFIDFVector = HashtagUtil.createAllUserTFIDFVector(userTagTimestamps, tagUserCount); System.out.print(" vector 1 >> " + userTFIDFVector.get("user1").getVector()); System.out.print(" vector 2 >> " + userTFIDFVector.get("user2").getVector()); System.out.print(" vector 3 >> " + userTFIDFVector.get("user3").getVector()); double cosineSimilarity = CosineSimilarityCalculator.getCosineSimilarity(userTFIDFVector.get("user1"), userTFIDFVector.get("user2")); System.out.println(" cosine Similarity Score >> " + cosineSimilarity); }