@Test
public void testGetHelpLines() {

  TestAction action = new TestAction() {
    @Override
    public List<Option> getOptions() {
      return ImmutableList.<Option>of(
          EndpointsOption.makeVisibleNonFlagOption(
              "t",
              "test",
              "TEST",
              "This is a totally meaningless description, which is used to test output of "
              + "helpLines() method."));
    }
  };
  assertTrue(action.isHelpDisplayNeeded());
  List<String> expectedLines = ImmutableList.of(
      "test",
      "",
      "This is an Endpoints tool action for junit tests.",
      "",
      "Usage: <Endpoints tool> test <OPTIONS>",
      "",
      "Options:",
      "  -t TEST, --test=TEST",
      "    This is a totally meaningless description, which is used to test output of",
      "    helpLines() method.",
      "",
      "Example:",
      "  <Endpoints tool> --option=option test",
      "");
  assertEquals(expectedLines, action.getHelpLines());
}