```@ExperimentalCoroutinesApi internal class Partn...
# getting-started
a
Copy code
@ExperimentalCoroutinesApi
internal class PartnerApiClientTest {

    private lateinit var partnerApiClient: PartnerApiClient

    @BeforeEach
    fun setup() {
        partnerApiClient = PartnerApiClient()
    }

    @Test
    fun `When foo is bar then baz`() = runBlockingTest {
        val partner = partnerApiClient.getPartner(Brand.SomeBrand, "1234")
        expectThat(partner).isRight()
    }
}
getPartner()
returns
Either<PartnerClientError, Option<Partner>>
This throws exception
Copy code
java.lang.IllegalStateException: This job has not completed yet
	at kotlinx.coroutines.JobSupport.getCompletionExceptionOrNull(JobSupport.kt:1190)
What should I do?
I believe its throwing this because the
getPartners()
function is using
kotlinx.coroutines.future.await()