### Question:
CaseStudy { public static void demonstrate() { String code = "The code"; Course course = Courses.findByCode(code); Lecturer lecturer = course.getLecturer(); String name = lecturer.getName(); System.out.println(name); }  static void demonstrate();  }### Answer:
@Test public void demonstrateTest() { CaseStudy.demonstrate(); String expected = String.format("The lecturer%s", System.lineSeparator()); String obtained = out.toString(); assertEquals(obtained, expected); }