### Question:
ColorBag { public List<String> toList() { return new ArrayList<>(colors); }  void add(String color); void remove(String color); List<String> toList(); boolean contains(String color); int size();  }### Answer:
@Test @DisplayName("color bag should be transformed into List") void toList() { var myList = Arrays.asList("red","green", "yellow", "blue", "magenta", "brown"); var colorList = colorBag.toList(); Collections.sort(myList); Collections.sort(colorList); assertEquals(colorList, myList, "failure - color bag not transformed into List"); }