1/* 2 * Copyright (c) 2007 Mockito contributors 3 * This program is made available under the terms of the MIT License. 4 */ 5 6package org.mockito; 7 8import org.mockito.invocation.InvocationOnMock; 9import org.mockito.stubbing.Answer; 10 11/** 12 * @deprecated 13 * <b>Instead, please use {@link Answer} interface</b> 14 * <p> 15 * In rare cases your code might not compile with recent deprecation & changes. 16 * Very sorry for inconvenience but it had to be done in order to keep framework consistent. 17 * <p> 18 * Why it is deprecated? ReturnValues is being replaced by Answer 19 * for better consistency & interoperability of the framework. 20 * Answer interface has been in Mockito for a while and it has the same responsibility as ReturnValues. 21 * There's no point in mainting exactly the same interfaces. 22 * <p> 23 * Configures return values for an unstubbed invocation 24 * <p> 25 * Can be used in {@link Mockito#mock(Class, ReturnValues)} 26 */ 27@Deprecated 28public interface ReturnValues { 29 30 /** 31 * return value for an unstubbed invocation 32 * 33 * @param invocation placeholder for mock and a method 34 * @return the return value 35 */ 36 Object valueFor(InvocationOnMock invocation) throws Throwable; 37}