[android-components](../index.md) / [mozilla.components.support.test](index.md) / [whenever](./whenever.md)

# whenever

`inline fun <T> whenever(methodCall: `[`T`](whenever.md#T)`): OngoingStubbing<`[`T`](whenever.md#T)`>` [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/support/test/src/main/java/mozilla/components/support/test/Mock.kt#L30)

Enables stubbing methods. Use it when you want the mock to return particular value when particular method is called.

Alias for [Mockito.when](#).

Taken from [mockito-kotlin](https://github.com/nhaarman/mockito-kotlin/).

