public static Rating computeRating(@Nullable Double percent) {
    if (percent == null || percent >= 80.0D) {
      return A;
    } else if (percent >= 70.0D) {
      return B;
    } else if (percent >= 50.0D) {
      return C;
    } else if (percent >= 30.0D) {
      return D;
    }
    return E;
  }
@Test
  @UseDataProvider("values")
  public void compute_rating(double percent, Rating expectedRating) {
    assertThat(computeRating(percent)).isEqualTo(expectedRating);
  }