|
23 | 23 | import java.util.Arrays;
|
24 | 24 | import java.util.Comparator;
|
25 | 25 | import java.util.List;
|
| 26 | +import java.util.NoSuchElementException; |
26 | 27 |
|
27 | 28 | import org.junit.Test;
|
28 | 29 | import org.mockito.InOrder;
|
@@ -56,7 +57,7 @@ public void testMinWithEmpty() {
|
56 | 57 | observable.subscribe(observer);
|
57 | 58 | InOrder inOrder = inOrder(observer);
|
58 | 59 | inOrder.verify(observer, times(1)).onError(
|
59 |
| - isA(IllegalArgumentException.class)); |
| 60 | + isA(NoSuchElementException.class)); |
60 | 61 | inOrder.verifyNoMoreInteractions();
|
61 | 62 | }
|
62 | 63 |
|
@@ -96,7 +97,7 @@ public int compare(Integer o1, Integer o2) {
|
96 | 97 | observable.subscribe(observer);
|
97 | 98 | InOrder inOrder = inOrder(observer);
|
98 | 99 | inOrder.verify(observer, times(1)).onError(
|
99 |
| - isA(IllegalArgumentException.class)); |
| 100 | + isA(NoSuchElementException.class)); |
100 | 101 | inOrder.verifyNoMoreInteractions();
|
101 | 102 | }
|
102 | 103 |
|
@@ -216,7 +217,7 @@ public void testMaxWithEmpty() {
|
216 | 217 | observable.subscribe(observer);
|
217 | 218 | InOrder inOrder = inOrder(observer);
|
218 | 219 | inOrder.verify(observer, times(1)).onError(
|
219 |
| - isA(IllegalArgumentException.class)); |
| 220 | + isA(NoSuchElementException.class)); |
220 | 221 | inOrder.verifyNoMoreInteractions();
|
221 | 222 | }
|
222 | 223 |
|
@@ -256,7 +257,7 @@ public int compare(Integer o1, Integer o2) {
|
256 | 257 | observable.subscribe(observer);
|
257 | 258 | InOrder inOrder = inOrder(observer);
|
258 | 259 | inOrder.verify(observer, times(1)).onError(
|
259 |
| - isA(IllegalArgumentException.class)); |
| 260 | + isA(NoSuchElementException.class)); |
260 | 261 | inOrder.verifyNoMoreInteractions();
|
261 | 262 | }
|
262 | 263 |
|
|
0 commit comments