@Test
public void testCompare() {

  // Test with 3 resources
  setupExtraResource();
  // Keep cluster resources even so that the numbers are easy to understand
  Resource cluster = newResource(4L, 4, 4);
  assertComparison(cluster, newResource(1, 1, 1), newResource(1, 1, 1), 0);
  assertComparison(cluster, newResource(0, 0, 0), newResource(0, 0, 0), 0);
  assertComparison(cluster, newResource(2, 2, 2), newResource(1, 1, 1), 1);
  assertComparison(cluster, newResource(2, 2, 2), newResource(0, 0, 0), 1);
  if (resourceCalculator instanceof DefaultResourceCalculator) {
    testCompareDefault(cluster);
  } else if (resourceCalculator instanceof DominantResourceCalculator) {
    testCompareDominant(cluster);
    testCompareDominantZeroValueResource();
  }
}