Skip to content

Commit 27b98ec

Browse files
committed
- fixes a mocks types to prevent unit tests from failing
1 parent 0835957 commit 27b98ec

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/test/java/com/microsoft/graph/http/BaseCollectionRequestTests.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import org.junit.Before;
1414
import org.junit.Test;
1515

16+
import java.io.InputStream;
1617
import java.util.ArrayList;
1718
import java.util.Arrays;
1819

@@ -27,7 +28,6 @@
2728
import static org.junit.Assert.assertNotNull;
2829
import static org.junit.Assert.assertNull;
2930
import static org.mockito.ArgumentMatchers.any;
30-
import static org.mockito.ArgumentMatchers.anyString;
3131
import static org.mockito.Mockito.mock;
3232
import static org.mockito.Mockito.when;
3333

@@ -75,7 +75,7 @@ public void setUp() throws Exception {
7575
final ICollectionResponse<JsonObject> result = mock(ICollectionResponse.class);
7676
when(result.values()).thenReturn(new ArrayList<>(Arrays.asList(resultobj)));
7777
final ISerializer mSerializer = mock(ISerializer.class);
78-
when(mSerializer.deserializeObject(anyString(), any())).thenReturn(result);
78+
when(mSerializer.deserializeObject(any(InputStream.class), any(), any())).thenReturn(result);
7979
when(mSerializer.serializeObject(any())).thenReturn("[{ \"id\": \"zzz\" }]");
8080
CoreHttpProvider mProvider = new CoreHttpProvider(mSerializer,
8181
mock(ILogger.class),

0 commit comments

Comments
 (0)