diff --git a/irs-cucumber-tests/src/test/java/org/eclipse/tractusx/irs/cucumber/E2ETestHelperForPolicyStoreApi.java b/irs-cucumber-tests/src/test/java/org/eclipse/tractusx/irs/cucumber/E2ETestHelperForPolicyStoreApi.java index 55dccb54c7..599b404d38 100644 --- a/irs-cucumber-tests/src/test/java/org/eclipse/tractusx/irs/cucumber/E2ETestHelperForPolicyStoreApi.java +++ b/irs-cucumber-tests/src/test/java/org/eclipse/tractusx/irs/cucumber/E2ETestHelperForPolicyStoreApi.java @@ -123,7 +123,11 @@ public static HashMap> getExpectedBpnToPolicyIdsMapping( public static Stream extractPolicyIdsForBpn( final Map>> bpnToPoliciesMap, final String bpn) { - return extractPolicyIds(bpnToPoliciesMap.get(bpn).stream()); + List> policyIds = bpnToPoliciesMap.get(bpn); + if (policyIds == null) { + policyIds = new ArrayList<>(); + } + return extractPolicyIds(policyIds.stream()); } @SuppressWarnings("rawtypes")