@Test
public void getModules() {

    MutableLiveData<List<ModuleEntity>> modules = new MutableLiveData<>();
    modules.setValue(dummyModules);
    when(academyRepository.getAllModulesByCourse(courseId)).thenReturn(modules);
    List<ModuleEntity> moduleEntities = viewModel.getModules().getValue();
    verify(academyRepository).getAllModulesByCourse(courseId);
    assertNotNull(moduleEntities);
    assertEquals(7, moduleEntities.size());
    viewModel.getModules().observeForever(modulesObserver);
    verify(modulesObserver).onChanged(dummyModules);
}