Yum { public GenericYumCommand remove(YumPackageName... packages) { return new GenericYumCommand(terminal, "remove", List.of(packages), REMOVE_NOOP_PATTERN); } Yum(Terminal terminal); Optional<YumPackageName> queryInstalled(TaskContext context, String packageName); InstallFixedYumCommand installFixedVersion(YumPackageName yumPackage); GenericYumCommand install(YumPackageName... packages); GenericYumCommand install(String package1, String... packages); GenericYumCommand install(List<String> packages); GenericYumCommand upgrade(YumPackageName... packages); GenericYumCommand upgrade(String package1, String... packages); GenericYumCommand upgrade(List<String> packages); GenericYumCommand remove(YumPackageName... packages); GenericYumCommand remove(String package1, String... packages); GenericYumCommand remove(List<String> packages);  }
@Test public void testAlreadyRemoved() { terminal.expectCommand( "yum remove --assumeyes package-1 package-2 2>&1", 0, "foobar\nNo Packages marked for removal\n"); assertFalse(yum .remove("package-1", "package-2") .converge(taskContext)); }