test_class.declarator: mockMvc
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private MockMvc mockMvc;
test_class.type: MockMvc
test_class.var_name: mockMvc
test_class.declarator: entityService
test_class.modifier: @MockBean
      private
test_class.original_string: @MockBean
      private EntityService entityService;
test_class.type: EntityService
test_class.var_name: entityService
test_class.declarator: appendPayload
test_class.modifier: private
test_class.original_string: private String appendPayload;
test_class.type: String
test_class.var_name: appendPayload
test_class.declarator: updatePayload
test_class.modifier: private
test_class.original_string: private String updatePayload;
test_class.type: String
test_class.var_name: updatePayload
test_class.declarator: entityPayload
test_class.modifier: private
test_class.original_string: private String entityPayload;
test_class.type: String
test_class.var_name: entityPayload
test_class.declarator: partialUpdatePayload
test_class.modifier: private
test_class.original_string: private String partialUpdatePayload;
test_class.type: String
test_class.var_name: partialUpdatePayload
test_class.declarator: partialUpdateDefaultCasePayload
test_class.modifier: private
test_class.original_string: private String partialUpdateDefaultCasePayload;
test_class.type: String
test_class.var_name: partialUpdateDefaultCasePayload
test_class.file: Core/EntityManager/src/test/java/eu/neclab/ngsildbroker/entityhandler/controller/EntityControllerTest.java
test_class.identifier: EntityControllerTest
test_case.body: @Test
  	public void deleteAttributeInstanceIfDatasetIdExistTest() {
  		try {
  			when(entityService.deleteAttribute(any(), any(), any(), any())).thenReturn(true);
  			mockMvc.perform(delete(
  					"/ngsi-ld/v1/entities/{entityId}/attrs/{attrId}?datasetId=urn:ngsi-ld:Property:speedometerA4567-speed",
  					"urn:ngsi-ld:Vehicle:A101", "speed").contentType(AppConstants.NGB_APPLICATION_JSONLD))
  					.andExpect(status().isNoContent());
  			verify(entityService, times(1)).deleteAttribute(any(), any(), any(), any());
  		} catch (Exception e) {
  			Assert.fail();
  			e.printStackTrace();
  		}
  	}
test_case.class_method_signature: EntityControllerTest.deleteAttributeInstanceIfDatasetIdExistTest()
test_case.full_signature: @Test public void deleteAttributeInstanceIfDatasetIdExistTest()
test_case.identifier: deleteAttributeInstanceIfDatasetIdExistTest
test_case.invocations: thenReturn when deleteAttribute any any any any andExpect perform contentType delete isNoContent status deleteAttribute verify times any any any any fail printStackTrace
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void deleteAttributeInstanceIfDatasetIdExistTest()
focal_class.declarator: logger = LoggerFactory.getLogger(EntityController.class)
focal_class.modifier: private final static
focal_class.original_string: private final static Logger logger = LoggerFactory.getLogger(EntityController.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: entityService
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired
  	EntityService entityService;
focal_class.type: EntityService
focal_class.var_name: entityService
focal_class.declarator: objectMapper
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired
  	ObjectMapper objectMapper;
focal_class.type: ObjectMapper
focal_class.var_name: objectMapper
focal_class.declarator: contextResolver
focal_class.modifier: @Autowired
  	@Qualifier("emconRes")
focal_class.original_string: @Autowired
  	@Qualifier("emconRes")
  	ContextResolverBasic contextResolver;
focal_class.type: ContextResolverBasic
focal_class.var_name: contextResolver
focal_class.declarator: paramsResolver
focal_class.modifier: @Autowired
  	@Qualifier("emparamsres")
focal_class.original_string: @Autowired
  	@Qualifier("emparamsres")
  	ParamsResolver paramsResolver;
focal_class.type: ParamsResolver
focal_class.var_name: paramsResolver
focal_class.declarator: producerChannel
focal_class.modifier: @SuppressWarnings("unused")
  	// TODO check to remove ... never used
  	private
focal_class.original_string: @SuppressWarnings("unused")
  	// TODO check to remove ... never used
  	private EntityProducerChannel producerChannel;
focal_class.type: EntityProducerChannel
focal_class.var_name: producerChannel
focal_class.declarator: httpUtils
focal_class.modifier: private
focal_class.original_string: private HttpUtils httpUtils;
focal_class.type: HttpUtils
focal_class.var_name: httpUtils
focal_class.declarator: start
focal_class.original_string: LocalDateTime start;
focal_class.type: LocalDateTime
focal_class.var_name: start
focal_class.declarator: end
focal_class.original_string: LocalDateTime end;
focal_class.type: LocalDateTime
focal_class.var_name: end
focal_class.file: Core/EntityManager/src/main/java/eu/neclab/ngsildbroker/entityhandler/controller/EntityController.java
focal_class.identifier: EntityController
focal_class.class_method_signature: EntityController.EntityController(EntityProducerChannel producerChannel)
focal_class.full_signature: @Autowired public  EntityController(EntityProducerChannel producerChannel)
focal_class.identifier: EntityController
focal_class.modifiers: @Autowired public
focal_class.parameters: (EntityProducerChannel producerChannel)
focal_class.signature:  EntityController(EntityProducerChannel producerChannel)
focal_class.class_method_signature: EntityController.setup()
focal_class.full_signature: @PostConstruct private void setup()
focal_class.identifier: setup
focal_class.modifiers: @PostConstruct private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void setup()
focal_class.class_method_signature: EntityController.EntityController()
focal_class.full_signature: public  EntityController()
focal_class.identifier: EntityController
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  EntityController()
focal_class.class_method_signature: EntityController.createEntity(HttpServletRequest request,
  			@RequestBody(required = false) String payload)
focal_class.full_signature: @PostMapping public ResponseEntity<byte[]> createEntity(HttpServletRequest request,
  			@RequestBody(required = false) String payload)
focal_class.identifier: createEntity
focal_class.modifiers: @PostMapping public
focal_class.parameters: (HttpServletRequest request,
  			@RequestBody(required = false) String payload)
focal_class.return: ResponseEntity<byte[]>
focal_class.signature: ResponseEntity<byte[]> createEntity(HttpServletRequest request,
  			@RequestBody(required = false) String payload)
focal_class.class_method_signature: EntityController.updateEntity(HttpServletRequest request, @PathVariable("entityId") String entityId,
  			@RequestBody String payload)
focal_class.full_signature: @PatchMapping("/{entityId}/attrs") public ResponseEntity<byte[]> updateEntity(HttpServletRequest request, @PathVariable("entityId") String entityId,
  			@RequestBody String payload)
focal_class.identifier: updateEntity
focal_class.modifiers: @PatchMapping("/{entityId}/attrs") public
focal_class.parameters: (HttpServletRequest request, @PathVariable("entityId") String entityId,
  			@RequestBody String payload)
focal_class.return: ResponseEntity<byte[]>
focal_class.signature: ResponseEntity<byte[]> updateEntity(HttpServletRequest request, @PathVariable("entityId") String entityId,
  			@RequestBody String payload)
focal_class.class_method_signature: EntityController.appendEntity(HttpServletRequest request, @PathVariable("entityId") String entityId,
  			@RequestBody String payload, @RequestParam(required = false, name = "options") String options)
focal_class.full_signature: @PostMapping("/{entityId}/attrs") public ResponseEntity<byte[]> appendEntity(HttpServletRequest request, @PathVariable("entityId") String entityId,
  			@RequestBody String payload, @RequestParam(required = false, name = "options") String options)
focal_class.identifier: appendEntity
focal_class.modifiers: @PostMapping("/{entityId}/attrs") public
focal_class.parameters: (HttpServletRequest request, @PathVariable("entityId") String entityId,
  			@RequestBody String payload, @RequestParam(required = false, name = "options") String options)
focal_class.return: ResponseEntity<byte[]>
focal_class.signature: ResponseEntity<byte[]> appendEntity(HttpServletRequest request, @PathVariable("entityId") String entityId,
  			@RequestBody String payload, @RequestParam(required = false, name = "options") String options)
focal_class.class_method_signature: EntityController.partialUpdateEntity(HttpServletRequest request,
  			@PathVariable("entityId") String entityId, @PathVariable("attrId") String attrId,
  			@RequestBody String payload)
focal_class.full_signature: @PatchMapping("/{entityId}/attrs/{attrId}") public ResponseEntity<byte[]> partialUpdateEntity(HttpServletRequest request,
  			@PathVariable("entityId") String entityId, @PathVariable("attrId") String attrId,
  			@RequestBody String payload)
focal_class.identifier: partialUpdateEntity
focal_class.modifiers: @PatchMapping("/{entityId}/attrs/{attrId}") public
focal_class.parameters: (HttpServletRequest request,
  			@PathVariable("entityId") String entityId, @PathVariable("attrId") String attrId,
  			@RequestBody String payload)
focal_class.return: ResponseEntity<byte[]>
focal_class.signature: ResponseEntity<byte[]> partialUpdateEntity(HttpServletRequest request,
  			@PathVariable("entityId") String entityId, @PathVariable("attrId") String attrId,
  			@RequestBody String payload)
focal_class.class_method_signature: EntityController.deleteAttribute(HttpServletRequest request, @PathVariable("entityId") String entityId,
  			@PathVariable("attrId") String attrId,@RequestParam(value = "datasetId", required = false) String datasetId,
  			@RequestParam(value = "deleteAll", required = false) String deleteAll)
focal_class.full_signature: @DeleteMapping("/{entityId}/attrs/{attrId}") public ResponseEntity<byte[]> deleteAttribute(HttpServletRequest request, @PathVariable("entityId") String entityId,
  			@PathVariable("attrId") String attrId,@RequestParam(value = "datasetId", required = false) String datasetId,
  			@RequestParam(value = "deleteAll", required = false) String deleteAll)
focal_class.identifier: deleteAttribute
focal_class.modifiers: @DeleteMapping("/{entityId}/attrs/{attrId}") public
focal_class.parameters: (HttpServletRequest request, @PathVariable("entityId") String entityId,
  			@PathVariable("attrId") String attrId,@RequestParam(value = "datasetId", required = false) String datasetId,
  			@RequestParam(value = "deleteAll", required = false) String deleteAll)
focal_class.return: ResponseEntity<byte[]>
focal_class.signature: ResponseEntity<byte[]> deleteAttribute(HttpServletRequest request, @PathVariable("entityId") String entityId,
  			@PathVariable("attrId") String attrId,@RequestParam(value = "datasetId", required = false) String datasetId,
  			@RequestParam(value = "deleteAll", required = false) String deleteAll)
focal_class.class_method_signature: EntityController.deleteEntity(@PathVariable("entityId") String entityId)
focal_class.full_signature: @DeleteMapping("/{entityId}") public ResponseEntity<byte[]> deleteEntity(@PathVariable("entityId") String entityId)
focal_class.identifier: deleteEntity
focal_class.modifiers: @DeleteMapping("/{entityId}") public
focal_class.parameters: (@PathVariable("entityId") String entityId)
focal_class.return: ResponseEntity<byte[]>
focal_class.signature: ResponseEntity<byte[]> deleteEntity(@PathVariable("entityId") String entityId)
focal_method.body: @DeleteMapping("/{entityId}/attrs/{attrId}")
  	public ResponseEntity<byte[]> deleteAttribute(HttpServletRequest request, @PathVariable("entityId") String entityId,
  			@PathVariable("attrId") String attrId,@RequestParam(value = "datasetId", required = false) String datasetId,
  			@RequestParam(value = "deleteAll", required = false) String deleteAll) {
  		try {
  			logger.trace("delete attribute :: started");
  			Validator.validate(request.getParameterMap());
  			String expandedAttrib = paramsResolver.expandAttribute(attrId, HttpUtils.getAtContext(request));
  			entityService.deleteAttribute(entityId, expandedAttrib,datasetId,deleteAll);
  			logger.trace("delete attribute :: completed");
  			return ResponseEntity.noContent().build();
  		} catch (ResponseException responseException) {
  			logger.error("Exception :: ", responseException);
  			return ResponseEntity.status(responseException.getHttpStatus()).body(new RestResponse(responseException).toJsonBytes());
  		} catch(DateTimeParseException exception) {
  			return ResponseEntity.status(HttpStatus.BAD_REQUEST)
  					.body(new RestResponse(ErrorType.BadRequestData, "Failed to parse provided datetime field.").toJsonBytes());
  		} catch(JsonParseException exception) {
  			return ResponseEntity.status(HttpStatus.BAD_REQUEST)
  					.body(new RestResponse(ErrorType.BadRequestData, "There is an error in the provided json document").toJsonBytes());
  		} catch (Exception exception) {
  			logger.error("Exception :: ", exception);
  			return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
  					.body(new RestResponse(ErrorType.InternalError, exception.getLocalizedMessage()).toJsonBytes());
  		}
  	}
focal_method.class_method_signature: EntityController.deleteAttribute(HttpServletRequest request, @PathVariable("entityId") String entityId,
  			@PathVariable("attrId") String attrId,@RequestParam(value = "datasetId", required = false) String datasetId,
  			@RequestParam(value = "deleteAll", required = false) String deleteAll)
focal_method.full_signature: @DeleteMapping("/{entityId}/attrs/{attrId}") public ResponseEntity<byte[]> deleteAttribute(HttpServletRequest request, @PathVariable("entityId") String entityId,
  			@PathVariable("attrId") String attrId,@RequestParam(value = "datasetId", required = false) String datasetId,
  			@RequestParam(value = "deleteAll", required = false) String deleteAll)
focal_method.identifier: deleteAttribute
focal_method.invocations: trace validate getParameterMap expandAttribute getAtContext deleteAttribute trace build noContent error body status getHttpStatus toJsonBytes body status toJsonBytes body status toJsonBytes error body status toJsonBytes getLocalizedMessage
focal_method.modifiers: @DeleteMapping("/{entityId}/attrs/{attrId}") public
focal_method.parameters: (HttpServletRequest request, @PathVariable("entityId") String entityId,
  			@PathVariable("attrId") String attrId,@RequestParam(value = "datasetId", required = false) String datasetId,
  			@RequestParam(value = "deleteAll", required = false) String deleteAll)
focal_method.return: ResponseEntity<byte[]>
focal_method.signature: ResponseEntity<byte[]> deleteAttribute(HttpServletRequest request, @PathVariable("entityId") String entityId,
  			@PathVariable("attrId") String attrId,@RequestParam(value = "datasetId", required = false) String datasetId,
  			@RequestParam(value = "deleteAll", required = false) String deleteAll)