DetailCourseViewModel extends ViewModel { public List<ModuleEntity> getModules() { return academyRepository.getAllModulesByCourse(courseId); } DetailCourseViewModel(AcademyRepository mAcademyRepository); void setSelectedCourse(String courseId); CourseEntity getCourse(); List<ModuleEntity> getModules();  }
@Test public void getModules() { List<ModuleEntity> moduleEntities = viewModel.getModules(); assertNotNull(moduleEntities); assertEquals(7, moduleEntities.size()); }