EvaluateRoadSourceCnossos { public static Double getCoeff(String coeff, int freq, String vehicleCategory, int coeffVer) { int Freq_ind; switch (freq) { case 63: Freq_ind=0; break; case 125: Freq_ind=1; break; case 250: Freq_ind=2; break; case 500: Freq_ind=3; break; case 1000: Freq_ind=4; break; case 2000: Freq_ind=5; break; case 4000: Freq_ind=6; break; case 8000: Freq_ind=7; break; default: Freq_ind=0; } return getCnossosData(coeffVer).get("vehicles").get(vehicleCategory).get(coeff).get(Freq_ind).doubleValue(); }  static JsonNode getCnossosData(int coeffVer); static Double getA_Roadcoeff(int Freq, String vehCat, String RoadSurface, int coeffVer); static Double getB_Roadcoeff(String vehCat, String roadSurface, int coeffVer); static double getCr(String vehCat, int k, int coeffVer); static double getCp(String vehCat, int k, int coeffVer); static Double getCoeff(String coeff, int freq, String vehicleCategory, int coeffVer); static double evaluate(RSParametersCnossos parameters);  }
@Test public void TestTableIII() { int Freq = 125; String VehCat = "2"; final Double coeff = EvaluateRoadSourceCnossos.getCoeff("ar",Freq, VehCat, 1); assertEquals(88.7 , coeff, EPSILON_TEST1); }