### Question:
ListOps { static <T> List<T> reverse(List<T> list) { throw new UnsupportedOperationException("Delete this statement and write your own implementation."); } private  ListOps();   }### Answer:
@Ignore("Remove to run test") @Test public void testReversingEmptyList() { assertEquals( Collections.emptyList(), ListOps.reverse(Collections.emptyList()) ); }
@Ignore("Remove to run test") @Test public void testReversingNonEmptyList() { assertEquals( Arrays.asList('7', '5', '3', '1'), ListOps.reverse(Arrays.asList('1', '3', '5', '7')) ); }
@Ignore("Remove to run test") @Test public void testReversingListOfListIsNotFlattened() { List<List<Character>> listOfLists = Arrays.asList( Arrays.asList('1', '2'), Collections.singletonList('3'), Collections.emptyList(), Arrays.asList('4', '5', '6') ); assertEquals( Arrays.asList( Arrays.asList('4', '5', '6'), Collections.emptyList(), Collections.singletonList('3'), Arrays.asList('1', '2') ), ListOps.reverse(listOfLists) ); }