public void formatSource(CharSource input, CharSink output)
      throws FormatterException, IOException {
    // TODO(cushon): proper support for streaming input/output. Input may
    // not be feasible (parsing) but output should be easier.
    output.write(formatSource(input.read()));
  }
@Test
  public void onlyWrapLineCommentOnWhitespace() throws Exception {
    assertThat(
            new Formatter()
                .formatSource(
                    "class T {\n"
                        + "  public static void main(String[] args) { // one_long_incredibly"
                        + "_unbroken_sentence_moving_from_topic_to_topic_so_that_no-one_had_a"
                        + "_chance_to_interrupt;\n"
                        + "  }\n"
                        + "}\n"))
        .isEqualTo(
            "class T {\n"
                + "  public static void main(\n"
                + "      String[]\n"
                + "          args) { // one_long_incredibly"
                + "_unbroken_sentence_moving_from_topic_to_topic_so_that_no-one_had_a"
                + "_chance_to_interrupt;\n"
                + "  }\n"
                + "}\n");
  }