### Question:
CollectionUtils { @SuppressWarnings("unchecked") public static <T> Collection<T> toBaseTypedCollection(Collection<? extends T> initial) { return (Collection<T>)initial; } private  CollectionUtils(); static void reconcileObjectCollections(Collection<T> existingCollection, Collection<T> updatedCollection,
                                                         CollectionReconciliationHelper<T, K> reconciliationHelper,
                                                         boolean removeMissingObjects); @SuppressWarnings("unchecked") static List<T> toBaseTypedList(List<? extends T> initial); @SuppressWarnings("unchecked") static Collection<T> toBaseTypedCollection(Collection<? extends T> initial); static void addUniqueValues(List<T> source, List<T> target); static T getSingleValue(List<T> list);  }### Answer:
@Test public void toBaseTypedCollection() { Collection<SubTestObject> collection = new ArrayList<SubTestObject>(); collection.add(new SubTestObject("a", "b")); collection.add(new SubTestObject("a", "b")); collection.add(new SubTestObject("a", "b")); Collection<TestObject> down = CollectionUtils.toBaseTypedCollection((Collection<? extends TestObject>) collection); assertThat(down.contains(collection.toArray()[0]), is(true)); assertThat(down.contains(collection.toArray()[1]), is(true)); assertThat(down.contains(collection.toArray()[2]), is(true)); }
@Test public void toBaseTypedCollection_null() { Collection<SubTestObject> collection = null; Collection<TestObject> down = CollectionUtils.toBaseTypedCollection((Collection<? extends TestObject>) collection); assertThat(down, is(nullValue())); }