HelmCreate extends HelmCommand<HelmCreate> { public HelmCreate starter(String scaffold) { return withArguments(Arguments.of("--starter", scaffold)); } HelmCreate(String name);   HelmCreate(String helm, Arguments arguments, Arguments flags, EnvironmentVariables env); @Override HelmCreate newInstance(String helm, Arguments arguments, Arguments flags, EnvironmentVariables env); HelmCreate starter(String scaffold);  }
@Test public void shouldAddDryRunOption() { HelmCreate command = Helm.create("foo"); HelmCreate copy = command.starter("bar"); assertThat(copy, is(not(sameInstance(command)))); assertCommand(copy, "create", "foo", "--starter", "bar"); }