Cleanup: remove redundant casts
[yangtools.git] / common / testutils / src / test / java / org / opendaylight / yangtools / testutils / mockito / tests / MockitoExampleTutorialTest.java
index 0896717eca40d1dbf573cbf85d7c0db966a770e2..1679d7ee1afdc0efc6647f862f931313713a063a 100644 (file)
@@ -61,7 +61,7 @@ public class MockitoExampleTutorialTest {
         SomeService service = mock(SomeService.class);
         when(service.foobar(any())).thenAnswer(invocation -> {
             // Urgh! This is ugly.. (Mockito 2.0 may be better, see http://site.mockito.org/mockito/docs/current/org/mockito/ArgumentMatcher.html)
-            File file = (File) invocation.getArgumentAt(0, File.class);
+            File file = invocation.getArgumentAt(0, File.class);
             if (file.getName().equals("hello.txt")) {
                 return 123;
             } else {