DetailCourseViewModel extends ViewModel { public CourseEntity getCourse() { return academyRepository.getCourseWithModules(courseId); } DetailCourseViewModel(AcademyRepository mAcademyRepository); void setSelectedCourse(String courseId); CourseEntity getCourse(); List<ModuleEntity> getModules();  }
@Test public void getCourse() { viewModel.setSelectedCourse(dummyCourse.getCourseId()); CourseEntity courseEntity = viewModel.getCourse(); assertNotNull(courseEntity); assertEquals(dummyCourse.getCourseId(), courseEntity.getCourseId()); assertEquals(dummyCourse.getDeadline(), courseEntity.getDeadline()); assertEquals(dummyCourse.getDescription(), courseEntity.getDescription()); assertEquals(dummyCourse.getImagePath(), courseEntity.getImagePath()); assertEquals(dummyCourse.getTitle(), courseEntity.getTitle()); }