void () { TaskRepository repository = new YouTrackRepository(new YouTrackRepositoryType()); repository.setShared(true); myTaskManager.setRepositories(Collections.singletonList(repository)); myTaskManager.setRepositories(Collections.emptyList()); TaskProjectConfiguration configuration = getProject().getService(TaskProjectConfiguration.class); assertEquals(0, configuration.getState().servers.size()); }