CourseReaderViewModel extends ViewModel { public ModuleEntity getSelectedModule() { return academyRepository.getContent(courseId, moduleId); } CourseReaderViewModel(AcademyRepository mAcademyRepository); void setSelectedCourse(String courseId); void setSelectedModule(String moduleId); ArrayList<ModuleEntity> getModules(); ModuleEntity getSelectedModule();  }
@Test public void getSelectedModule() { ModuleEntity moduleEntity = viewModel.getSelectedModule(); assertNotNull(moduleEntity); ContentEntity contentEntity = moduleEntity.contentEntity; assertNotNull(contentEntity); String content = contentEntity.getContent(); assertNotNull(content); assertEquals(content, dummyModules.get(0).contentEntity.getContent()); }