@Test
public void getAllModulesByCourse() {

    doAnswer(invocation -> {
        ((RemoteDataSource.LoadModulesCallback) invocation.getArguments()[1])
                .onAllModulesReceived(moduleResponses);
        return null;
    }).when(remote).getModules(eq(courseId), any(RemoteDataSource.LoadModulesCallback.class));
    List<ModuleEntity> courseEntities = LiveDataTestUtil.getValue(academyRepository.getAllModulesByCourse(courseId));
    verify(remote).getModules(eq(courseId), any(RemoteDataSource.LoadModulesCallback.class));
    assertNotNull(courseEntities);
    assertEquals(moduleResponses.size(), courseEntities.size());
}