### Question:
SynchronizeTagsWithTriggerWorker extends SwingWorkerWithBusyDialog<Void, Object> { protected void removeExcessiveTags() { for (int i = tagSet.getChannelTagCount()-1; i >= positions.length ; i--) { Tag tag = tagSet.getChannelTagAt(i); tagSet.removeTag(tag); } } SynchronizeTagsWithTriggerWorker(SynchronizeTagsWithTriggerParameters parameters, Integer[] slopes);   }### Answer:
@Test public void testRemoveExcessiveTags() throws InterruptedException, ExecutionException { StyledTagSet tagSet = parameters.getTagSet(); Integer[] positions = new Integer[] { 1, 2 }; Tag[] remainingTags = new Tag[positions.length]; for (int i = 0; i < positions.length; i++) remainingTags[i] = tagSet.getChannelTagAt(i); SynchronizeTagsWithTriggerWorker worker = new SynchronizeTagsWithTriggerWorker(parameters, positions); worker.setBusyDialogShouldBeShown(false); worker.execute(); worker.get(); int channelStyleCount = tagSet.getChannelTagCount(); assertEquals(positions.length, channelStyleCount); for (int i = 0; i < remainingTags.length; i++) assertEquals(tagSet.getChannelTagAt(i), remainingTags[i]); }