@Test public void Test3updateXTrxLog() { VXTrxLog vxPrev = new VXTrxLog(); vxPrev.setId(id); vxPrev.setObjectName(name); VXTrxLog vxExp = new VXTrxLog(); vxExp.setId(id); vxExp.setObjectName("test1"); Mockito.when(xAuditMgr.updateXTrxLog(vxPrev)).thenReturn(vxExp); VXTrxLog vxAct = auditREST.updateXTrxLog(vxPrev); Assert.assertNotNull(vxAct); Assert.assertEquals(vxExp, vxAct); Assert.assertEquals(vxExp.getObjectName(), vxAct.getObjectName()); Mockito.verify(xAuditMgr).updateXTrxLog(vxPrev); }
@PUT @Path("/trx_log") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.UPDATE_X_TRX_LOG + "\")") public VXTrxLog updateXTrxLog(VXTrxLog vXTrxLog) { return xAuditMgr.updateXTrxLog(vXTrxLog); }
XAuditREST { @PUT @Path("/trx_log") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.UPDATE_X_TRX_LOG + "\")") public VXTrxLog updateXTrxLog(VXTrxLog vXTrxLog) { return xAuditMgr.updateXTrxLog(vXTrxLog); } }
XAuditREST { @PUT @Path("/trx_log") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.UPDATE_X_TRX_LOG + "\")") public VXTrxLog updateXTrxLog(VXTrxLog vXTrxLog) { return xAuditMgr.updateXTrxLog(vXTrxLog); }  }
XAuditREST { @PUT @Path("/trx_log") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.UPDATE_X_TRX_LOG + "\")") public VXTrxLog updateXTrxLog(VXTrxLog vXTrxLog) { return xAuditMgr.updateXTrxLog(vXTrxLog); }  @GET @Path("/trx_log/{id}") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.GET_X_TRX_LOG + "\")") VXTrxLog getXTrxLog(
			@PathParam("id") Long id); @POST @Path("/trx_log") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.CREATE_X_TRX_LOG + "\")") VXTrxLog createXTrxLog(VXTrxLog vXTrxLog); @PUT @Path("/trx_log") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.UPDATE_X_TRX_LOG + "\")") VXTrxLog updateXTrxLog(VXTrxLog vXTrxLog); @DELETE @Path("/trx_log/{id}") @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.DELETE_X_TRX_LOG + "\")") @RangerAnnotationClassName(class_name = VXTrxLog.class) void deleteXTrxLog(@PathParam("id") Long id,
			@Context HttpServletRequest request); @GET @Path("/trx_log") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.SEARCH_X_TRX_LOG + "\")") VXTrxLogList searchXTrxLogs(@Context HttpServletRequest request); @GET @Path("/trx_log/count") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.COUNT_X_TRX_LOGS + "\")") VXLong countXTrxLogs(@Context HttpServletRequest request); @GET @Path("/access_audit") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.SEARCH_X_ACCESS_AUDITS + "\")") VXAccessAuditList searchXAccessAudits(@Context HttpServletRequest request); @GET @Path("/access_audit/count") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.COUNT_X_ACCESS_AUDITS + "\")") VXLong countXAccessAudits(@Context HttpServletRequest request); }
XAuditREST { @PUT @Path("/trx_log") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.UPDATE_X_TRX_LOG + "\")") public VXTrxLog updateXTrxLog(VXTrxLog vXTrxLog) { return xAuditMgr.updateXTrxLog(vXTrxLog); }  @GET @Path("/trx_log/{id}") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.GET_X_TRX_LOG + "\")") VXTrxLog getXTrxLog(
			@PathParam("id") Long id); @POST @Path("/trx_log") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.CREATE_X_TRX_LOG + "\")") VXTrxLog createXTrxLog(VXTrxLog vXTrxLog); @PUT @Path("/trx_log") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.UPDATE_X_TRX_LOG + "\")") VXTrxLog updateXTrxLog(VXTrxLog vXTrxLog); @DELETE @Path("/trx_log/{id}") @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.DELETE_X_TRX_LOG + "\")") @RangerAnnotationClassName(class_name = VXTrxLog.class) void deleteXTrxLog(@PathParam("id") Long id,
			@Context HttpServletRequest request); @GET @Path("/trx_log") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.SEARCH_X_TRX_LOG + "\")") VXTrxLogList searchXTrxLogs(@Context HttpServletRequest request); @GET @Path("/trx_log/count") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.COUNT_X_TRX_LOGS + "\")") VXLong countXTrxLogs(@Context HttpServletRequest request); @GET @Path("/access_audit") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.SEARCH_X_ACCESS_AUDITS + "\")") VXAccessAuditList searchXAccessAudits(@Context HttpServletRequest request); @GET @Path("/access_audit/count") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.COUNT_X_ACCESS_AUDITS + "\")") VXLong countXAccessAudits(@Context HttpServletRequest request);  }