title: java.lang.AssertionError: Assertion failed - Android JUnit Mockito
body: <pre><code> @Before
  fun setUp() {
      val compositeDisposable = CompositeDisposable()
      testScheduler = TestScheduler()
      val testSchedulerProvider = TestSchedulerProvider(testScheduler)
      sharedViewModel = SharedViewModel(
          testSchedulerProvider,
          compositeDisposable,
          networkHelper,
          repository, notesRepository, userPreferences
      )
      sharedViewModel.noteSaving.observeForever(
          noteSavingObserver
      )
      sharedViewModel.clearNoteText.observeForever(clearNoteTextObserver)
  
  }
  
  
  @Test
  fun givenServerResponse200_whenNotesSaved_shouldclearTextField() {
      val notes = &quot;testNote&quot;
      val latitude = 3.62176
      val longitude = -7.932457
      sharedViewModel.notesField.value = notes
      sharedViewModel.latLongField.value =
          LocationModel(latitude, longitude)
      sharedViewModel.currentLocation.value = &quot;test location&quot;
      val newNote = Notes(latitude, longitude, notes, userPreferences.getUserId())
      doReturn(true)
          .`when`(networkHelper)
          .isNetworkConnected()
  
      doReturn(Single.just(true))
          .`when`(notesRepository).addNotes(newNote)
      assert(sharedViewModel.clearNoteText.value == Event(&quot;Note Saved Successfully&quot;))
  
      sharedViewModel.addNote()
      testScheduler.triggerActions()
  }
  </code></pre>
  <p>I am not able to assert a statement which is getting failed for some reason though I have mocked the requirements. I couldn't identify the reason</p>
  <p>Any help would be appreciated.</p>