### Question:
IsolatedProcessors { static SortedSet<Integer> parseProcessorRange(String range) { SortedSet<Integer> processors = new TreeSet<>(); for (String part : StringUtils.trim(range).split(",")) { if (part.contains("-")) { String[] parts = part.split("-"); int first = Integer.parseInt(parts[0]); int last = Integer.parseInt(parts[1]); for (int i = first; i <= last; i++) { processors.add(i); } } else if (!part.isEmpty()) { processors.add(Integer.parseInt(part)); } } return processors; }    }### Answer:
@Test public void testParseProcessors() throws Exception { assertEquals(Sets.newHashSet(), IsolatedProcessors.parseProcessorRange("")); assertEquals(Sets.newHashSet(1, 3, 4, 5, 6, 7), IsolatedProcessors.parseProcessorRange("1,3-7")); assertEquals(Sets.newHashSet(1), IsolatedProcessors.parseProcessorRange("1")); assertEquals(Sets.newHashSet(1, 3), IsolatedProcessors.parseProcessorRange("1,3")); assertEquals(Sets.newHashSet(1, 3, 4, 5, 6, 7, 10, 11, 12, 13), IsolatedProcessors.parseProcessorRange("1,3-7,10-13")); assertEquals(Sets.newHashSet(1, 3, 4, 5, 6, 7), IsolatedProcessors.parseProcessorRange("1,3-7\n")); }