source: class TreeClusteringRecommender2Test extends AbstractRecommender {
  
    @Test
    public void testBestRating() throws Exception {
  
target:     DataModel dataModel = getDataModel(
              new long[] {1, 2, 3, 4},
              new Double[][] {
                      {0.1, 0.3},
                      {0.2, 0.3, 0.3},
                      {0.4, 0.3, 0.5},
                      {0.7, 0.3, 0.8},
              });
  
  
      UserSimilarity similarity = new PearsonCorrelationSimilarity(dataModel);
      ClusterSimilarity clusterSimilarity = new FarthestNeighborClusterSimilarity(similarity);
      Recommender recommender = new TreeClusteringRecommender2(dataModel, clusterSimilarity, 2);
      List<RecommendedItem> recommended = recommender.recommend(1, 1);
      assertNotNull(recommended);
      assertEquals(1, recommended.size());
      RecommendedItem firstRecommended = recommended.get(0);
      // item one should be recommended because it has a greater rating/score
      assertEquals(2, firstRecommended.getItemID());
      assertEquals(0.3, firstRecommended.getValue(), EPSILON);
    }
  
  }