@Test public void testGetCourseNamesWithEmptyList() { String[] names = DomainUtil.getCourseNames(new ArrayList<Course>()); assertEquals(names.length, 0); }
public static String[] getCourseNames(List<Course> courses) { List<String> courseNames = new ArrayList<String>(); for (Course c : courses) { courseNames.add(c.getName()); } return courseNames.toArray(new String[0]); }
DomainUtil { public static String[] getCourseNames(List<Course> courses) { List<String> courseNames = new ArrayList<String>(); for (Course c : courses) { courseNames.add(c.getName()); } return courseNames.toArray(new String[0]); } }
DomainUtil { public static String[] getCourseNames(List<Course> courses) { List<String> courseNames = new ArrayList<String>(); for (Course c : courses) { courseNames.add(c.getName()); } return courseNames.toArray(new String[0]); }  }
DomainUtil { public static String[] getCourseNames(List<Course> courses) { List<String> courseNames = new ArrayList<String>(); for (Course c : courses) { courseNames.add(c.getName()); } return courseNames.toArray(new String[0]); }  static String[] getCourseNames(List<Course> courses); }
DomainUtil { public static String[] getCourseNames(List<Course> courses) { List<String> courseNames = new ArrayList<String>(); for (Course c : courses) { courseNames.add(c.getName()); } return courseNames.toArray(new String[0]); }  static String[] getCourseNames(List<Course> courses);  }