• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2007 Mockito contributors
3  * This program is made available under the terms of the MIT License.
4  */
5 package org.mockito.stubbing;
6 
7 import org.mockito.CheckReturnValue;
8 import org.mockito.Mockito;
9 import org.mockito.NotExtensible;
10 
11 /**
12  * Used for declaring optional stubbings with {@link Mockito#lenient()}
13  *
14  * @since 2.20.0
15  */
16 @NotExtensible
17 public interface LenientStubber extends BaseStubber {
18 
19     /**
20      * Allows declaring the method to stub. See {@link Mockito#when(Object)}.
21      * Needed for classic stubbing with when().then()
22      *
23      * @since 2.20.0
24      */
25     @CheckReturnValue
when(T methodCall)26     <T> OngoingStubbing<T> when(T methodCall);
27 }
28