@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://localhost:4502"), connectionOptionsBuilder.build(), new SimpleCredentials("testUser", "pw".toCharArray()), "/target/path", "2", Arrays.asList("exclude1", "exclude2"), false);
    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://localhost:4503");
    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());
}