= CommentApiState.success( CommentModel(1, 1, "abc", "xyz") ) coEvery { repo.getComment(any()) } returns flowOf(mockResponse) coroutinesTestRule.testDispatcher.runBlockingTest { //response.collect { assertNotNull(it) } val response: Flow<CommentApiState<CommentModel>> = repo.getComment(1) response.test { assertEquals(awaitItem(), mockResponse) awaitComplete() } }