@Test public void test10deletePolicy() throws Exception { HttpServletRequest request = Mockito.mock(HttpServletRequest.class); Mockito.doNothing().when(serviceREST).deletePolicy(Id); publicAPIs.deletePolicy(Id, request); Mockito.verify(serviceREST).deletePolicy(Id); }
@DELETE @Path("/api/policy/{id}") @PreAuthorize("hasRole('ROLE_SYS_ADMIN')") @RangerAnnotationClassName(class_name = VXResource.class) public void deletePolicy(@PathParam("id") Long id, @Context HttpServletRequest request) { if(logger.isDebugEnabled()) { logger.debug("==> PublicAPIs.deletePolicy(): " + id ); } serviceREST.deletePolicy(id); if(logger.isDebugEnabled()) { logger.debug("<== PublicAPIs.deletePolicy(): " + id ); } }
PublicAPIs { @DELETE @Path("/api/policy/{id}") @PreAuthorize("hasRole('ROLE_SYS_ADMIN')") @RangerAnnotationClassName(class_name = VXResource.class) public void deletePolicy(@PathParam("id") Long id, @Context HttpServletRequest request) { if(logger.isDebugEnabled()) { logger.debug("==> PublicAPIs.deletePolicy(): " + id ); } serviceREST.deletePolicy(id); if(logger.isDebugEnabled()) { logger.debug("<== PublicAPIs.deletePolicy(): " + id ); } } }
PublicAPIs { @DELETE @Path("/api/policy/{id}") @PreAuthorize("hasRole('ROLE_SYS_ADMIN')") @RangerAnnotationClassName(class_name = VXResource.class) public void deletePolicy(@PathParam("id") Long id, @Context HttpServletRequest request) { if(logger.isDebugEnabled()) { logger.debug("==> PublicAPIs.deletePolicy(): " + id ); } serviceREST.deletePolicy(id); if(logger.isDebugEnabled()) { logger.debug("<== PublicAPIs.deletePolicy(): " + id ); } }  }
PublicAPIs { @DELETE @Path("/api/policy/{id}") @PreAuthorize("hasRole('ROLE_SYS_ADMIN')") @RangerAnnotationClassName(class_name = VXResource.class) public void deletePolicy(@PathParam("id") Long id, @Context HttpServletRequest request) { if(logger.isDebugEnabled()) { logger.debug("==> PublicAPIs.deletePolicy(): " + id ); } serviceREST.deletePolicy(id); if(logger.isDebugEnabled()) { logger.debug("<== PublicAPIs.deletePolicy(): " + id ); } }  @GET @Path("/api/repository/{id}") @Produces({ "application/json", "application/xml" }) VXRepository getRepository(@PathParam("id") Long id); @POST @Path("/api/repository/") @Produces({ "application/json", "application/xml" }) VXRepository createRepository(VXRepository vXRepository); @PUT @Path("/api/repository/{id}") @Produces({ "application/json", "application/xml" }) VXRepository updateRepository(VXRepository vXRepository,
			@PathParam("id") Long id); @DELETE @Path("/api/repository/{id}") @PreAuthorize("hasRole('ROLE_SYS_ADMIN')") @RangerAnnotationClassName(class_name = VXAsset.class) void deleteRepository(@PathParam("id") Long id,
			@Context HttpServletRequest request); @GET @Path("/api/repository/") @Produces({ "application/json", "application/xml" }) VXRepositoryList searchRepositories(
			@Context HttpServletRequest request); @GET @Path("/api/repository/count") @Produces({ "application/json", "application/xml" }) VXLong countRepositories(@Context HttpServletRequest request); @GET @Path("/api/policy/{id}") @Produces({ "application/json", "application/xml" }) VXPolicy getPolicy(@PathParam("id") Long id); @POST @Path("/api/policy") @Produces({ "application/json", "application/xml" }) VXPolicy createPolicy(VXPolicy vXPolicy); @PUT @Path("/api/policy/{id}") @Produces({ "application/json", "application/xml" }) VXPolicy updatePolicy(VXPolicy vXPolicy, @PathParam("id") Long id); @DELETE @Path("/api/policy/{id}") @PreAuthorize("hasRole('ROLE_SYS_ADMIN')") @RangerAnnotationClassName(class_name = VXResource.class) void deletePolicy(@PathParam("id") Long id,
			@Context HttpServletRequest request); @GET @Path("/api/policy") @Produces({ "application/json", "application/xml" }) VXPolicyList searchPolicies(@Context HttpServletRequest request); @GET @Path("/api/policy/count") @Produces({ "application/xml", "application/json" }) VXLong countPolicies(@Context HttpServletRequest request); }
PublicAPIs { @DELETE @Path("/api/policy/{id}") @PreAuthorize("hasRole('ROLE_SYS_ADMIN')") @RangerAnnotationClassName(class_name = VXResource.class) public void deletePolicy(@PathParam("id") Long id, @Context HttpServletRequest request) { if(logger.isDebugEnabled()) { logger.debug("==> PublicAPIs.deletePolicy(): " + id ); } serviceREST.deletePolicy(id); if(logger.isDebugEnabled()) { logger.debug("<== PublicAPIs.deletePolicy(): " + id ); } }  @GET @Path("/api/repository/{id}") @Produces({ "application/json", "application/xml" }) VXRepository getRepository(@PathParam("id") Long id); @POST @Path("/api/repository/") @Produces({ "application/json", "application/xml" }) VXRepository createRepository(VXRepository vXRepository); @PUT @Path("/api/repository/{id}") @Produces({ "application/json", "application/xml" }) VXRepository updateRepository(VXRepository vXRepository,
			@PathParam("id") Long id); @DELETE @Path("/api/repository/{id}") @PreAuthorize("hasRole('ROLE_SYS_ADMIN')") @RangerAnnotationClassName(class_name = VXAsset.class) void deleteRepository(@PathParam("id") Long id,
			@Context HttpServletRequest request); @GET @Path("/api/repository/") @Produces({ "application/json", "application/xml" }) VXRepositoryList searchRepositories(
			@Context HttpServletRequest request); @GET @Path("/api/repository/count") @Produces({ "application/json", "application/xml" }) VXLong countRepositories(@Context HttpServletRequest request); @GET @Path("/api/policy/{id}") @Produces({ "application/json", "application/xml" }) VXPolicy getPolicy(@PathParam("id") Long id); @POST @Path("/api/policy") @Produces({ "application/json", "application/xml" }) VXPolicy createPolicy(VXPolicy vXPolicy); @PUT @Path("/api/policy/{id}") @Produces({ "application/json", "application/xml" }) VXPolicy updatePolicy(VXPolicy vXPolicy, @PathParam("id") Long id); @DELETE @Path("/api/policy/{id}") @PreAuthorize("hasRole('ROLE_SYS_ADMIN')") @RangerAnnotationClassName(class_name = VXResource.class) void deletePolicy(@PathParam("id") Long id,
			@Context HttpServletRequest request); @GET @Path("/api/policy") @Produces({ "application/json", "application/xml" }) VXPolicyList searchPolicies(@Context HttpServletRequest request); @GET @Path("/api/policy/count") @Produces({ "application/xml", "application/json" }) VXLong countPolicies(@Context HttpServletRequest request);  }