### Question:
InternalQueries { @SuppressWarnings("unchecked") @NonNull public static <T> Set<T> unmodifiableNonNullSet(@Nullable Set<T> set) { return set == null || set.isEmpty() ? (Set<T>) emptySet() : Collections.unmodifiableSet(set); } private  InternalQueries(); @NonNull static List<String> unmodifiableNonNullListOfStrings(@Nullable Object[] args); @NonNull static List<String> unmodifiableNonNullListOfStrings(@Nullable List<?> args); @NonNull static List<Object> unmodifiableNonNullList(@Nullable Object[] args); @SuppressWarnings("unchecked") @NonNull static List<T> unmodifiableNonNullList(@Nullable List<T> list); @SuppressWarnings("unchecked") @NonNull static Set<T> unmodifiableNonNullSet(@Nullable Set<T> set); @NonNull static String[] nonNullArrayOfStrings(@Nullable List<String> list); @Nullable static String[] nullableArrayOfStringsFromListOfStrings(@Nullable List<String> list); @Nullable static String[] nullableArrayOfStrings(@Nullable List<Object> list); @NonNull static String nonNullString(@Nullable String str); @Nullable static String nullableString(@Nullable String str); @SuppressWarnings("unchecked") @NonNull static Set<String> nonNullSet(@Nullable Collection<String> collection); @SuppressWarnings("unchecked") @NonNull static Set<String> nonNullSet(@Nullable String[] items); @SuppressWarnings("unchecked") @NonNull static Set<String> nonNullSet(@NonNull String firstItem, @Nullable String[] otherItems);  }### Answer:
@Test public void nullSetToUnmodifiableNonNullSet() { assertThat(InternalQueries.unmodifiableNonNullSet(null)).isSameAs(emptySet()); }
@Test public void emptySetToUnmodifiableNonNullSet() { assertThat(InternalQueries.unmodifiableNonNullSet(new HashSet<Object>())).isSameAs(emptySet()); }
@Test public void nonEmptySetToUnmodifiableNonNullSet() { Set<String> testSet = new HashSet<String>(); testSet.add("1"); testSet.add("2"); testSet.add("3"); Set<String> unmodifiableSet = InternalQueries.unmodifiableNonNullSet(testSet); assertThat(unmodifiableSet).isEqualTo(testSet); }