1/*
2 * Copyright (c) 2007 Mockito contributors
3 * This program is made available under the terms of the MIT License.
4 */
5package org.mockito.stubbing.answers;
6
7import java.util.Collection;
8
9/**
10 * Returns elements of the collection. Keeps returning the last element forever.
11 * Might be useful on occasion when you have a collection of elements to return.
12 * <p>
13 * <pre class="code"><code class="java">
14 *   //this:
15 *   when(mock.foo()).thenReturn(1, 2, 3);
16 *   //is equivalent to:
17 *   when(mock.foo()).thenReturn(new ReturnsElementsOf(Arrays.asList(1, 2, 3)));
18 * </code></pre>
19 *
20 * @deprecated Use {@link org.mockito.AdditionalAnswers#returnsElementsOf}
21 */
22@Deprecated
23public class ReturnsElementsOf extends org.mockito.internal.stubbing.answers.ReturnsElementsOf {
24
25    @Deprecated
26    public ReturnsElementsOf(Collection<?> elements) {
27        super(elements);
28    }
29}