diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/test/java/org/wso2/carbon/apimgt/impl/dao/test/APIMgtDAOTest.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/test/java/org/wso2/carbon/apimgt/impl/dao/test/APIMgtDAOTest.java index a07eb46b9940..aaf8f7e4b222 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/test/java/org/wso2/carbon/apimgt/impl/dao/test/APIMgtDAOTest.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/test/java/org/wso2/carbon/apimgt/impl/dao/test/APIMgtDAOTest.java @@ -366,6 +366,7 @@ public void testAddGetApplicationByNameWithUserNameNullGroupIdNull() throws Exce @Test public void testKeyForwardCompatibility() throws Exception { List oldApiVersionList = new ArrayList<>(); + List oldApiProductVersionList = new ArrayList<>(); API apiOld = new API(new APIIdentifier("SUMEDHA", "API1", "V1.0.0")); oldApiVersionList.add(apiOld); @@ -376,7 +377,7 @@ public void testKeyForwardCompatibility() throws Exception { api.setUUID(UUID.randomUUID().toString()); api.getId().setId(apiMgtDAO.addAPI(api, -1234, "testOrg")); ApiTypeWrapper apiTypeWrapper = new ApiTypeWrapper(api); - apiMgtDAO.makeKeysForwardCompatible(apiTypeWrapper, oldApiVersionList); + apiMgtDAO.makeKeysForwardCompatible(apiTypeWrapper, oldApiVersionList, oldApiProductVersionList); } @Test @@ -418,8 +419,10 @@ public void testForwardingBlockedAndProdOnlyBlockedSubscriptionsToNewAPIVersion( // once API v2.0.0 is added, v1.0.0 becomes an older version hence add it to oldApiVersionList oldApiVersionList.add(api); + List oldApiProductVersionList = new ArrayList<>(); + ApiTypeWrapper apiTypeWrapper2 = new ApiTypeWrapper(api2); - apiMgtDAO.makeKeysForwardCompatible(apiTypeWrapper2, oldApiVersionList); + apiMgtDAO.makeKeysForwardCompatible(apiTypeWrapper2, oldApiVersionList, oldApiProductVersionList); List subscriptionsOfAPI2 = apiMgtDAO.getSubscriptionsOfAPI(apiId2.getApiName(), "V2.0.0", apiId2.getProviderName()); @@ -442,7 +445,7 @@ public void testForwardingBlockedAndProdOnlyBlockedSubscriptionsToNewAPIVersion( oldApiVersionList.add(api2); ApiTypeWrapper apiTypeWrapper3 = new ApiTypeWrapper(api3); - apiMgtDAO.makeKeysForwardCompatible(apiTypeWrapper3, oldApiVersionList); + apiMgtDAO.makeKeysForwardCompatible(apiTypeWrapper3, oldApiVersionList, oldApiProductVersionList); List subscriptionsOfAPI3 = apiMgtDAO.getSubscriptionsOfAPI(apiId1.getApiName(), "V3.0.0", apiId1.getProviderName());