@Test
public void testGetClientLibWithDebugOutput() throws Exception {

  tool.execute(new String[]{GetClientLibAction.NAME,
      option(EndpointsToolAction.OPTION_CLASS_PATH_SHORT), "classPath",
      option(EndpointsToolAction.OPTION_LANGUAGE_SHORT), "java",
      option(EndpointsToolAction.OPTION_OUTPUT_DIR_SHORT), "outputDir",
      option(EndpointsToolAction.OPTION_DEBUG, false),
      option(EndpointsToolAction.OPTION_HOSTNAME_SHORT), "foo.com",
      option(EndpointsToolAction.OPTION_BASE_PATH_SHORT), "/api",
      "MyService", "MyService2"});
  assertFalse(usagePrinted);
  assertThat(Lists.newArrayList(classPath))
      .containsExactly(new File("classPath").toURI().toURL(),
          new File(new File(EndpointsToolAction.DEFAULT_WAR_PATH).getAbsoluteFile(),
              "/WEB-INF/classes")
              .toURI()
              .toURL());
  assertEquals("java", language);
  assertEquals("outputDir", outputDirPath);
  assertStringsEqual(Arrays.asList("MyService", "MyService2"), serviceClassNames);
  assertEquals(null, buildSystem);
  assertTrue(debugOutput);
  assertThat(hostname).isEqualTo("foo.com");
  assertThat(basePath).isEqualTo("/api");
}