@Test
public void testRatioWithExtraResource() {

  //setup
  setupExtraResource();
  Resource resource1 = newResource(1, 1, 2);
  Resource resource2 = newResource(2, 1, 1);
  //act
  float ratio = resourceCalculator.ratio(resource1, resource2);
  //assert
  if (resourceCalculator instanceof DefaultResourceCalculator) {
    double ratioOfMemories = 0.5;
    assertEquals(ratioOfMemories, ratio, 0.00001);
  } else if (resourceCalculator instanceof DominantResourceCalculator) {
    double ratioOfExtraResources = 2.0;
    assertEquals(ratioOfExtraResources, ratio, 0.00001);
  }
}