### Question:
SubscriptionController { @RequestMapping(method = RequestMethod.DELETE, value = "/{id}") public ResponseEntity<byte[]> deleteSubscription(HttpServletRequest request, @PathVariable(name = NGSIConstants.QUERY_PARAMETER_ID, required = true) URI id) { try { logger.trace("call deleteSubscription() ::"); manager.unsubscribe(id); } catch (ResponseException e) { logger.error("Exception ::", e); return ResponseEntity.status(e.getHttpStatus()).body(new RestResponse(e).toJsonBytes()); } return ResponseEntity.noContent().build(); }  @RequestMapping(method = RequestMethod.POST) @ResponseBody ResponseEntity<byte[]> subscribeRest(HttpServletRequest request, @RequestBody String payload); @RequestMapping(method = RequestMethod.GET, value = "/") ResponseEntity<byte[]> getAllSubscriptions(HttpServletRequest request,
			@RequestParam(required = false, name = "limit", defaultValue = "0") int limit); @RequestMapping(method = RequestMethod.GET, value = "/{id}") ResponseEntity<byte[]> getSubscriptions(HttpServletRequest request,
			@PathVariable(name = NGSIConstants.QUERY_PARAMETER_ID, required = true) String id,
			@RequestParam(required = false, name = "limit", defaultValue = "0") int limit); @RequestMapping(method = RequestMethod.DELETE, value = "/{id}") ResponseEntity<byte[]> deleteSubscription(HttpServletRequest request,
			@PathVariable(name = NGSIConstants.QUERY_PARAMETER_ID, required = true) URI id); @RequestMapping(method = RequestMethod.PATCH, value = "/{" + NGSIConstants.QUERY_PARAMETER_ID + "}") ResponseEntity<byte[]> updateSubscription(HttpServletRequest request,
			@PathVariable(name = NGSIConstants.QUERY_PARAMETER_ID, required = true) URI id,
			@RequestBody String payload);  }### Answer:
@Test public void deleteSubscriptionTest() { try { mockMvc.perform(delete("/ngsi-ld/v1/subscriptions/{id}", "urn:ngsi-ld:Subscription:211") .contentType(AppConstants.NGB_APPLICATION_JSONLD)).andExpect(status().isNoContent()); verify(subscriptionService, times(1)).unsubscribe(any()); } catch (Exception e) { Assert.fail(); e.printStackTrace(); } }