### Question:
KendallsTau implements RankCorrelationCalculator, Comparator<ValuePair> { public double calculateRankCorrelation(final double x[], final double y[]) { if (x.length != y.length) { throw new IllegalArgumentException("The x and y array must have the same size!"); } ValuePair pairs[] = new ValuePair[x.length]; for (int i = 0; i < x.length; ++i) { pairs[i] = new ValuePair(x[i], y[i]); } Arrays.sort(pairs, this); return calculateRankCorrelation(pairs); }  double calculateRankCorrelation(final double x[], final double y[]); @Override int compare(ValuePair pair1, ValuePair pair2);  }### Answer:
@Test public void test() { KendallsTau kendallsTau = new KendallsTau(); Assert.assertEquals(expectedCorrelation, kendallsTau.calculateRankCorrelation(x, y), DOUBLE_PRECISION_DELTA); }