### Question:
MemcachedSet implements Iterable<String> { static Set<String> decodeSet(String value) { Set<String> pageIds = new HashSet<>(); if (value != null) { for (String delta : Strings.split(value, ' ')) { if (delta.startsWith(PLUS)) { pageIds.add(delta.substring(1).trim()); } else if (delta.startsWith(MINUS)) { pageIds.remove(delta.substring(1).trim()); } } } return pageIds; } MemcachedSet(MemcachedClient client, String key, int expirationTime); @Override Iterator<String> iterator(); boolean add(String value); boolean remove(String value); void compact(); void compact(Predicate<String> predicate);  }### Answer:
@Test public void decode() { assertEquals(new HashSet<>(), MemcachedSet.decodeSet(null)); assertEquals(new HashSet<>(), MemcachedSet.decodeSet("")); assertEquals(new HashSet<>(Arrays.asList("1", "2", "3")), MemcachedSet.decodeSet("+1 +2 +3")); assertEquals(new HashSet<>(Arrays.asList("2", "3")), MemcachedSet.decodeSet("+1 +2 +3 -1 -4")); assertEquals(new HashSet<>(Arrays.asList("A", "B")), MemcachedSet.decodeSet("+A +A +B -B +B -C +C -C")); }