|
46 | 46 | import org.junit.BeforeClass; |
47 | 47 | import org.junit.Test; |
48 | 48 | import org.mockito.Mockito; |
49 | | -import org.mockito.MockitoAnnotations; |
50 | 49 | import org.mockito.invocation.InvocationOnMock; |
51 | 50 | import org.mockito.stubbing.Answer; |
52 | 51 | import org.slf4j.event.Level; |
|
59 | 58 | import static org.junit.Assert.assertNull; |
60 | 59 | import static org.junit.Assert.assertTrue; |
61 | 60 | import static org.junit.Assert.fail; |
62 | | -import static org.mockito.Matchers.any; |
63 | | -import static org.mockito.Matchers.anyLong; |
| 61 | +import static org.mockito.ArgumentMatchers.any; |
| 62 | +import static org.mockito.ArgumentMatchers.anyLong; |
64 | 63 | import static org.mockito.Mockito.mock; |
65 | 64 | import static org.mockito.Mockito.verifyNoMoreInteractions; |
66 | 65 | import static org.mockito.Mockito.when; |
@@ -367,7 +366,7 @@ public void testGetHAServiceStateWithTimeout() throws Exception { |
367 | 366 |
|
368 | 367 | setupProxyProvider(1, NAMENODE_HA_STATE_PROBE_TIMEOUT_SHORT); |
369 | 368 | final HAServiceState state = HAServiceState.STANDBY; |
370 | | - NNProxyInfo<ClientProtocol> dummyNNProxyInfo = |
| 369 | + @SuppressWarnings("unchecked") NNProxyInfo<ClientProtocol> dummyNNProxyInfo = |
371 | 370 | (NNProxyInfo<ClientProtocol>) mock(NNProxyInfo.class); |
372 | 371 | Future<HAServiceState> task = mock(Future.class); |
373 | 372 | when(task.get(anyLong(), any(TimeUnit.class))).thenReturn(state); |
@@ -452,7 +451,7 @@ public void testExecutionExceptionGetHAServiceStateWithTimeout() throws Exceptio |
452 | 451 | } |
453 | 452 |
|
454 | 453 | /** |
455 | | - * Test GetHAServiceState when timeout is disabled (test the else { task.get() } code path) |
| 454 | + * Test GetHAServiceState when timeout is disabled (test the else { task.get() } code path). |
456 | 455 | */ |
457 | 456 | @Test |
458 | 457 | public void testGetHAServiceStateWithoutTimeout() throws Exception { |
|
0 commit comments