static String formatPercent(double value) {
    DecimalFormat percentFormatter = new DecimalFormat("#.#", DecimalFormatSymbols.getInstance(Locale.ENGLISH));
    return percentFormatter.format(value) + "%";
  }
@Test
  public void format_percent() {
    assertThat(formatPercent(0d)).isEqualTo("0%");
    assertThat(formatPercent(12.345)).isEqualTo("12.3%");
    assertThat(formatPercent(12.56)).isEqualTo("12.6%");
  }