@Override
  public boolean retainAll(Collection<?> objects) {
    if (objects != null) {
      Set<CharSequenceWrapper> toRetain =
          objects.stream()
              .filter(CharSequence.class::isInstance)
              .map(CharSequence.class::cast)
              .map(CharSequenceWrapper::wrap)
              .collect(Collectors.toSet());

      return Iterables.retainAll(wrapperSet, toRetain);
    }

    return false;
  }
@Test
  public void testRetainAll() {
    CharSequenceSet set = CharSequenceSet.of(ImmutableList.of("123", "456"));

    assertThat(set.retainAll(ImmutableList.of("456", "789", 123)))
        .overridingErrorMessage("Set should be changed")
        .isTrue();

    assertThat(set).hasSize(1).contains("456");

    set = CharSequenceSet.of(ImmutableList.of("123", "456"));
    assertThat(set.retainAll(ImmutableList.of("123", "456")))
        .overridingErrorMessage("Set should not be changed")
        .isFalse();

    assertThat(set.retainAll(ImmutableList.of(123, 456)))
        .overridingErrorMessage("Set should be changed")
        .isTrue();

    assertThat(set).isEmpty();
  }