title: Android Unit Testing result List<List<Model>> instead of List<Model>
body: <p>I have tried to unit testing by <a href="https://medium.com/upday-devs/android-architecture-patterns-part-3-model-view-viewmodel-e7eeee76b73b" rel="nofollow noreferrer">https://medium.com/upday-devs/android-architecture-patterns-part-3-model-view-viewmodel-e7eeee76b73b</a>. 
  Why does Testsubscriber give List of ListModel result instead of ListModel ?</p>
  
  <p>my test</p>
  
  <pre><code>public class MainViewModelTest {
  
  @Mock
  private IDataModel mDataModel;
  
  private MainViewModel mMainViewModel;
  
  @Before
  public void setUp() throws Exception {
      MockitoAnnotations.initMocks(this);
  
  }
  
  @After
  public void tearDown() throws Exception {
  
  }
  
  @Test
  public void testGetSupportedLanguages_emitsCorrectLanguages() {
      Language de = new Language("German", LanguageCode.DE);
      Language en = new Language("English", LanguageCode.EN);
      List&lt;Language&gt; languages = Arrays.asList(de, en);
  
      Observable&lt;List&lt;Language&gt;&gt; mockObservable = Observable.just(languages);
  
      doReturn(mockObservable).when(mDataModel).getObservableSupportedLanguages();
  
      Language hr = new Language("Slovakian", LanguageCode.HR);
      List&lt;Language&gt; expectedLanguages = Arrays.asList(de, en, hr);
  
      mMainViewModel = new MainViewModel(mDataModel, new ImmediateSchedulerProvider());
      TestSubscriber&lt;List&lt;Language&gt;&gt; testSubscriber = new TestSubscriber&lt;&gt;();
  
      mMainViewModel.getObservableSupportedLanguages().subscribe(testSubscriber);
  
      testSubscriber.assertNoErrors();
      testSubscriber.assertReceivedOnNext(expectedLanguages); //here i get List&lt;List&lt;Language&gt;&gt; instead of one List&lt;Language&gt;
  
  
  }
  
  }
  </code></pre>
  
  <p>in MainViewModel</p>
  
  <pre><code> @NonNull
  public Observable&lt;List&lt;Language&gt;&gt; getObservableSupportedLanguages() {
      return mDataModel.getObservableSupportedLanguages();
  }
  </code></pre>
  
  <p>in DataModel</p>
  
  <pre><code>@NonNull
  @Override
  public Observable&lt;List&lt;Language&gt;&gt; getObservableSupportedLanguages() {
      return Observable.fromCallable(this::getLanguages);
  }
  
  @NonNull
  private List&lt;Language&gt; getLanguages() {
      return Arrays
              .asList(new Language("English", LanguageCode.EN),
                      new Language("German", LanguageCode.DE),
                      new Language("Slovakian", LanguageCode.HR));
  }
  </code></pre>