static JavaInput reorderModifiers(String text) throws FormatterException {
    return reorderModifiers(
        new JavaInput(text), ImmutableList.of(Range.closedOpen(0, text.length())));
  }
@Test
  public void whitespace() throws FormatterException {
    String[] lines = {
      "class Test {", //
      "  static",
      "  public int a;",
      "}",
    };
    String input = Joiner.on('\n').join(lines);
    String substring = "static public int a";
    int start = input.indexOf(substring);
    int end = start + substring.length();
    String output =
        ModifierOrderer.reorderModifiers(
                new JavaInput(input), Arrays.asList(Range.closedOpen(start, end)))
            .getText();
    assertThat(output).contains("public\n  static int a;");
  }