### Question:
InternalQueries { @Nullable public static String[] nullableArrayOfStrings(@Nullable List<Object> list) { if (list == null || list.isEmpty()) { return null; } else { final String[] strings = new String[list.size()]; for (int i = 0; i < list.size(); i++) { final Object arg = list.get(i); strings[i] = arg != null ? arg.toString() : "null"; } return strings; } } 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 nullListOfObjectsToNullableArrayOfStrings() { assertThat(InternalQueries.nullableArrayOfStrings(null)).isNull(); }
@Test public void emptyListOfObjectsToNullableArrayOfStrings() { List<Object> list = new ArrayList<Object>(); assertThat(InternalQueries.nullableArrayOfStrings(list)).isNull(); }
@Test public void nonEmptyListOfObjectsToNullableArrayOfStrings() { List<Object> list = new ArrayList<Object>(3); list.add(1); list.add(null); list.add(3); String[] array = InternalQueries.nullableArrayOfStrings(list); assertThat(array).containsExactly("1", "null", "3"); }