RcpTaskManagerImpl implements RcpTaskManager { @Override public RcpTask editTask(@NotNull String taskId, @Nullable RepositoryAddress src, @Nullable ConnectionOptions connectionOptions, @Nullable Credentials srcCreds, @Nullable String dst, @Nullable List<String> excludes, @Nullable WorkspaceFilter srcFilter, @Nullable Boolean recursive) throws ConfigurationException { RcpTaskImpl oldTask = tasks.get(taskId); if (oldTask == null) { throw new IllegalArgumentException("No such task with id='" + taskId + "'"); } RcpTaskImpl newTask = new RcpTaskImpl(oldTask, src, connectionOptions, srcCreds, dst, excludes, srcFilter, recursive); tasks.put(taskId, newTask); persistTasks(); return newTask; } RcpTaskManagerImpl();  RcpTaskManagerImpl(BundleContext bundleContext, ConfigurationAdmin configurationAdmin, Map <String, Object> newConfigProperties); RcpTask getTask(String taskId); Map<String, RcpTask> getTasks(); @Override RcpTask addTask(RepositoryAddress src, ConnectionOptions connectionOptions, Credentials srcCreds, String dst, String id, List<String> excludes, @Nullable Boolean recursive); @Override RcpTask addTask(RepositoryAddress src, ConnectionOptions connectionOptions, Credentials srcCreds, String dst, String id, WorkspaceFilter srcFilter,
            @Nullable Boolean recursive); @Override RcpTask editTask(@NotNull String taskId, @Nullable RepositoryAddress src, @Nullable ConnectionOptions connectionOptions, @Nullable Credentials srcCreds, @Nullable String dst, @Nullable List<String> excludes,
            @Nullable WorkspaceFilter srcFilter, @Nullable Boolean recursive); @Override boolean removeTask(String taskId); @Override void setSourceCredentials(String taskId, Credentials srcCreds);  }
@Test public void testEditTask() throws IOException, ConfigurationException, URISyntaxException { DefaultWorkspaceFilter filter = new DefaultWorkspaceFilter(); try (InputStream input = this.getClass().getResourceAsStream("/filter.xml")) { filter.load(input); } ConnectionOptions.Builder connectionOptionsBuilder = ConnectionOptions.builder(); connectionOptionsBuilder.proxyHost("proxyHost"); RcpTaskImpl taskOld = (RcpTaskImpl)taskManager.addTask(new RepositoryAddress("http: RcpTaskImpl taskNew = (RcpTaskImpl)taskManager.editTask(taskOld.getId(), null, null, null, null, null, null, null); Assert.assertThat(taskNew, new TaskMatcher(taskOld)); RepositoryAddress newSource = new RepositoryAddress("http: taskNew = (RcpTaskImpl)taskManager.editTask(taskOld.getId(), newSource, null, null, null, null, null, null); Assert.assertThat(taskNew, Matchers.not(new TaskMatcher(taskOld))); Assert.assertEquals(newSource, taskNew.getSource()); }