diff --git a/src/test/java/com/commercetools/project/sync/product/ProductSyncerTest.java b/src/test/java/com/commercetools/project/sync/product/ProductSyncerTest.java index 1188cc41..a0394ab7 100644 --- a/src/test/java/com/commercetools/project/sync/product/ProductSyncerTest.java +++ b/src/test/java/com/commercetools/project/sync/product/ProductSyncerTest.java @@ -272,9 +272,11 @@ void transform_WithErrorOnGraphQlRequest_ShouldContinueAndLogError() { @Test void getQuery_ShouldBuildProductQueryWithoutAnyExpansionPaths() { // preparation - final ProductSyncer productSyncer = - ProductSyncer.of( - mock(ProjectApiRoot.class), mock(ProjectApiRoot.class), getMockedClock(), null); + ProjectApiRoot apiRoot = mock(ProjectApiRoot.class); + when(apiRoot.productProjections()).thenReturn(mock()); + when(apiRoot.productProjections().get()).thenReturn(mock()); + when(apiRoot.productProjections().get().addStaged(anyBoolean())).thenReturn(mock()); + final ProductSyncer productSyncer = ProductSyncer.of(apiRoot, apiRoot, getMockedClock(), null); // test final ByProjectKeyProductProjectionsGet query = productSyncer.getQuery();