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