HelmHistory extends HelmCommand<HelmHistory> implements CLI.WithTLS<HelmHistory> { public HelmHistory max(int max) { return withFlags(Argument.of("--max", max)); } HelmHistory(String releaseName);   HelmHistory(String helm, Arguments arguments, Arguments flags, EnvironmentVariables env); HelmHistory max(int max); @Override HelmHistory newInstance(String helm, Arguments arguments, Arguments flags, EnvironmentVariables env);  }
@Test public void shouldAddMaxOption() { HelmHistory command = Helm.history("foo"); HelmHistory copy = command.max(19); assertThat(copy, is(not(sameInstance(command)))); assertCommand(copy, "history", "--max", "19", "foo"); }