@Test public void Test1getXTrxLog() { VXTrxLog vxExp = new VXTrxLog(); vxExp.setId(id); vxExp.setObjectName(name); Mockito.when(xAuditMgr.getXTrxLog(id)).thenReturn(vxExp); VXTrxLog vxAct = auditREST.getXTrxLog(id); Assert.assertNotNull(vxAct); Assert.assertEquals(vxExp, vxAct); Assert.assertEquals(vxExp.getId(), vxAct.getId()); Assert.assertEquals(vxExp.getObjectName(), vxAct.getObjectName()); Mockito.verify(xAuditMgr).getXTrxLog(id); }
@GET @Path("/trx_log/{id}") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.GET_X_TRX_LOG + "\")") public VXTrxLog getXTrxLog( @PathParam("id") Long id) { return xAuditMgr.getXTrxLog(id); }
XAuditREST { @GET @Path("/trx_log/{id}") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.GET_X_TRX_LOG + "\")") public VXTrxLog getXTrxLog( @PathParam("id") Long id) { return xAuditMgr.getXTrxLog(id); } }
XAuditREST { @GET @Path("/trx_log/{id}") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.GET_X_TRX_LOG + "\")") public VXTrxLog getXTrxLog( @PathParam("id") Long id) { return xAuditMgr.getXTrxLog(id); }  }
XAuditREST { @GET @Path("/trx_log/{id}") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.GET_X_TRX_LOG + "\")") public VXTrxLog getXTrxLog( @PathParam("id") Long id) { return xAuditMgr.getXTrxLog(id); }  @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 { @GET @Path("/trx_log/{id}") @Produces({ "application/xml", "application/json" }) @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + RangerAPIList.GET_X_TRX_LOG + "\")") public VXTrxLog getXTrxLog( @PathParam("id") Long id) { return xAuditMgr.getXTrxLog(id); }  @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);  }