use of org.apache.ranger.view.VXAuditMap in project ranger by apache.
the class TestXUserREST method test57updateXAuditMapNull.
@Test
public void test57updateXAuditMapNull() {
VXAuditMap testvXAuditMap = createVXAuditMapObj();
Mockito.when(restErrorUtil.createRESTException(Mockito.anyString(), (MessageEnums) Mockito.any())).thenThrow(new WebApplicationException());
thrown.expect(WebApplicationException.class);
VXAuditMap retvXAuditMap = xUserRest.updateXAuditMap(testvXAuditMap);
assertNull(retvXAuditMap);
Mockito.verify(xUserMgr).updateXAuditMap(testvXAuditMap);
Mockito.verify(xResourceService).readResource(null);
Mockito.verify(restErrorUtil.createRESTException(Mockito.anyString(), (MessageEnums) Mockito.any()));
}
Aggregations