Race { public int getPoints(Driver driver) { return Race.POINTS[position(driver)]; } Race(String name, Driver... drivers); int position(Driver driver); int getPoints(Driver driver); List<Driver> getResults(); String getDriverName(Driver driver); @Override String toString();  }
@Test public void isShouldCalculateDriverPoints() { Assert.assertEquals(25, TestData.race1.getPoints(TestData.driver1)); Assert.assertEquals(18, TestData.race1.getPoints(TestData.driver2)); Assert.assertEquals(15, TestData.race1.getPoints(TestData.driver3)); }