CourseReaderViewModel extends ViewModel { public ArrayList<ModuleEntity> getModules() { return academyRepository.getAllModulesByCourse(courseId); } CourseReaderViewModel(AcademyRepository mAcademyRepository); void setSelectedCourse(String courseId); void setSelectedModule(String moduleId); ArrayList<ModuleEntity> getModules(); ModuleEntity getSelectedModule();  }
@Test public void getModules() { ArrayList<ModuleEntity> moduleEntities = viewModel.getModules(); assertNotNull(moduleEntities); assertEquals(7, moduleEntities.size()); }