### Question:
MigrationTaskSkipper { public static void setDoNothingOnSkippedTasks(Collection<BaseTask> theTasks, String theSkipVersions) { if (isBlank(theSkipVersions) || theTasks.isEmpty()) { return; } Set<String> skippedVersionSet = Stream.of(theSkipVersions.split(",")) .map(String::trim) .map(s -> s.replace("'", "")) .map(s -> s.replace("\"", "")) .filter(StringUtils::isNotBlank) .collect(Collectors.toSet()); for (BaseTask task : theTasks) { if (skippedVersionSet.contains(task.getFlywayVersion())) { ourLog.info("Will skip {}: {}", task.getFlywayVersion(), task.getDescription()); task.setDoNothing(true); } } }  static void setDoNothingOnSkippedTasks(Collection<BaseTask> theTasks, String theSkipVersions);  }### Answer:
@Test public void startComma() { MigrationTaskSkipper.setDoNothingOnSkippedTasks(myTasks, "," + VERSION_PREFIX + 2 + "," + VERSION_PREFIX + 3); assertSkipped(myTasks, 2, 3); }
@Test public void quoted() { MigrationTaskSkipper.setDoNothingOnSkippedTasks(myTasks, "\"" + VERSION_PREFIX + 2 + "," + VERSION_PREFIX + 3 + "\""); assertSkipped(myTasks, 2, 3); }
@Test public void allQuoted() { MigrationTaskSkipper.setDoNothingOnSkippedTasks(myTasks, "\"" + VERSION_PREFIX + 2 + "\",\"" + VERSION_PREFIX + 3 + "\""); assertSkipped(myTasks, 2, 3); }
@Test public void oneQuoted() { MigrationTaskSkipper.setDoNothingOnSkippedTasks(myTasks, "\"" + VERSION_PREFIX + 2 + "\"" ); assertSkipped(myTasks, 2); }
@Test public void endComma() { MigrationTaskSkipper.setDoNothingOnSkippedTasks(myTasks, VERSION_PREFIX + 2 + "," + VERSION_PREFIX + 3 + ","); assertSkipped(myTasks, 2, 3); }
@Test public void skipNull() { MigrationTaskSkipper.setDoNothingOnSkippedTasks(myTasks, null); assertSkipped(myTasks); }
@Test public void skipAll() { MigrationTaskSkipper.setDoNothingOnSkippedTasks(myTasks, makeSkipString(1, 2, 3, 4, 5, 6)); assertSkipped(myTasks, 1, 2, 3, 4, 5, 6); }
@Test public void skipOne() { MigrationTaskSkipper.setDoNothingOnSkippedTasks(myTasks, makeSkipString(4)); assertSkipped(myTasks, 4); }
@Test public void skipTwo() { MigrationTaskSkipper.setDoNothingOnSkippedTasks(myTasks, VERSION_PREFIX + 2 + "," + VERSION_PREFIX + 3); assertSkipped(myTasks, 2, 3); }
@Test public void skipWeirdSpacing() { MigrationTaskSkipper.setDoNothingOnSkippedTasks(myTasks, " " + VERSION_PREFIX + 2 + " , " + VERSION_PREFIX + 3 + " "); assertSkipped(myTasks, 2, 3); }
@Test public void testDoubleComma() { MigrationTaskSkipper.setDoNothingOnSkippedTasks(myTasks, VERSION_PREFIX + 2 + ",," + VERSION_PREFIX + 3); assertSkipped(myTasks, 2, 3); }