HelmGetHooks extends HelmCommand<HelmGetHooks> { public HelmGetHooks revision(int revision) { return withFlags(Argument.of("--revision", revision)); } HelmGetHooks(String releaseName);   HelmGetHooks(String helm, Arguments arguments, Arguments flags, EnvironmentVariables env); HelmGetHooks revision(int revision); @Override HelmGetHooks newInstance(String helm, Arguments arguments, Arguments flags, EnvironmentVariables env);  }
@Test public void shouldAddRevisionOption() { HelmGetHooks command = Helm.getHooks("foo"); HelmGetHooks copy = command.revision(19); assertThat(copy, is(not(sameInstance(command)))); assertCommand(copy, "get", "hooks", "--revision", "19", "foo"); }