bhaveshamre commented on code in PR #647:
URL: https://github.com/apache/ranger/pull/647#discussion_r2329624335


##########
security-admin/src/test/java/org/apache/ranger/service/TestRangerServiceDefServiceBase.java:
##########
@@ -329,10 +330,9 @@ public void 
test11populateRangerPolicyConditionDefToXXnullValue() {
 
         Mockito.when(restErrorUtil.createRESTException("RangerServiceDef 
cannot be null.", MessageEnums.DATA_NOT_FOUND)).thenThrow(new 
WebApplicationException());
 
-        thrown.expect(WebApplicationException.class);
-
-        XXPolicyConditionDef dbPolicyConditionDef = 
rangerServiceDefService.populateRangerPolicyConditionDefToXX(rangerConditionDefvObj,
 policyConditionDefObj, serviceDefObj, 1);
-        Assert.assertNull(dbPolicyConditionDef);
+        
org.junit.jupiter.api.Assertions.assertThrows(WebApplicationException.class, () 
-> {

Review Comment:
   It's Fixed.



##########
security-admin/src/test/java/org/apache/ranger/service/TestRangerServiceDefServiceBase.java:
##########
@@ -468,10 +467,9 @@ public void test17populateRangerEnumDefToXXnullValue() {
 
         Mockito.when(restErrorUtil.createRESTException("RangerServiceDef 
cannot be null.", MessageEnums.DATA_NOT_FOUND)).thenThrow(new 
WebApplicationException());
 
-        thrown.expect(WebApplicationException.class);
-
-        XXEnumDef dbEnumDef = 
rangerServiceDefService.populateRangerEnumDefToXX(rangerEnumDefObj, enumDefObj, 
serviceDefObj, 1);
-        Assert.assertNull(dbEnumDef);
+        
org.junit.jupiter.api.Assertions.assertThrows(WebApplicationException.class, () 
-> {
+            
rangerServiceDefService.populateRangerEnumDefToXX(rangerEnumDefObj, enumDefObj, 
serviceDefObj, 1);

Review Comment:
   It's Fixed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to