Skip to content

Commit

Permalink
Fix NPE in test
Browse files Browse the repository at this point in the history
  • Loading branch information
salander85 committed Oct 26, 2023
1 parent ce26a52 commit cec344b
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit cec344b

Please sign in to comment.