@Override
  public void execute(final List<String> args, final PrintWriter terminal) {
    CliCmdUtil.ensureArgCountBounds(args, 1, 1, HELP);

    final String filePath = args.get(0);
    final String content = loadScript(filePath);
    requestExecutor.makeKsqlRequest(content);
  }
@Test
  public void shouldThrowIfDirectory() throws Exception {
    // Given:
    final File dir = TMP.newFolder();

    // When:
    final Exception e = assertThrows(
        KsqlException.class,
        () -> cmd.execute(ImmutableList.of(dir.toString()), terminal)
    );

    // Then:
    assertThat(e.getMessage(), containsString(
        "Failed to read file: " + dir.toString()));
    assertThat(e.getCause(), (hasMessage(anyOf(containsString(dir.toString()), containsString("Is a directory")))));
  }