title: Android JUnit testing api
body: <p>I have a function here which gets the list of Posts from JSONplaceholder api. If want to implement testing on this function how do I do it and what will I need, Mockito, JUnit</p>
  
  <pre><code> override fun getAllPosts(): Flowable&lt;List&lt;PostEntity&gt;&gt; {
          return postsService.getPosts()
              .flatMap { posts -&gt;
                  Flowable.fromIterable(posts)
                      .take(10)
                      .toList().toFlowable()
              }
      }
  
      @GET("/posts")
      fun getPosts(): Flowable&lt;List&lt;PostEntity&gt;&gt;
  </code></pre>
  
  <p>Please give me some pointers on how do I go about doing testing it in Android studio</p>
  
  <p>Thanks
  R</p>