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: csourceService
test_class.modifier: @MockBean
  	private
test_class.original_string: @MockBean
  	private CSourceService csourceService;
test_class.type: CSourceService
test_class.var_name: csourceService
test_class.declarator: payload
test_class.modifier: private
test_class.original_string: private String payload;
test_class.type: String
test_class.var_name: payload
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: CORE_CONTEXT_URL_STR = "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld"
test_class.modifier: private
test_class.original_string: private String CORE_CONTEXT_URL_STR = "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld";
test_class.type: String
test_class.var_name: CORE_CONTEXT_URL_STR
test_class.file: Registry/RegistryManager/src/test/java/eu/neclab/ngsildbroker/registryhandler/controller/RegistryControllerTest.java
test_class.identifier: RegistryControllerTest
test_case.body: @Test
  	public void deleteCsourceTest() {
  		try {
  			when(csourceService.deleteCSourceRegistration("urn:ngsi-ld:ContextSourceRegistration:csr1a3458"))
  					.thenReturn(true);
  			mockMvc.perform(delete("/ngsi-ld/v1/csourceRegistrations/{registrationId}", "urn:ngsi-ld:ContextSourceRegistration:csr1a3458")
  					.contentType(AppConstants.NGB_APPLICATION_JSONLD)).andExpect(status().isNoContent()).andDo(print());
  		} catch (Exception e) {
  			Assert.fail(e.getMessage());
  			e.printStackTrace();
  		}
  	}
test_case.class_method_signature: RegistryControllerTest.deleteCsourceTest()
test_case.full_signature: @Test public void deleteCsourceTest()
test_case.identifier: deleteCsourceTest
test_case.invocations: thenReturn when deleteCSourceRegistration andDo andExpect perform contentType delete isNoContent status print fail getMessage printStackTrace
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void deleteCsourceTest()
focal_class.declarator: logger = LoggerFactory.getLogger(RegistryController.class)
focal_class.modifier: private final static
focal_class.original_string: private final static Logger logger = LoggerFactory.getLogger(RegistryController.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: MY_REQUEST_MAPPING = "/ngsi-ld/v1/csourceRegistrations"
focal_class.modifier: private final static
focal_class.original_string: private final static String MY_REQUEST_MAPPING = "/ngsi-ld/v1/csourceRegistrations";
focal_class.type: String
focal_class.var_name: MY_REQUEST_MAPPING
focal_class.declarator: MY_REQUEST_MAPPING_ALT = "/ngsi-ld/v1/csourceRegistrations/"
focal_class.modifier: private final static
focal_class.original_string: private final static String MY_REQUEST_MAPPING_ALT = "/ngsi-ld/v1/csourceRegistrations/";
focal_class.type: String
focal_class.var_name: MY_REQUEST_MAPPING_ALT
focal_class.declarator: eurekaClient
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired
  	EurekaClient eurekaClient;
focal_class.type: EurekaClient
focal_class.var_name: eurekaClient
focal_class.declarator: csourceService
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired
  	CSourceService csourceService;
focal_class.type: CSourceService
focal_class.var_name: csourceService
focal_class.declarator: contextResolver
focal_class.modifier: @Autowired
  	@Qualifier("rmconRes")
focal_class.original_string: @Autowired
  	@Qualifier("rmconRes")
  	ContextResolverBasic contextResolver;
focal_class.type: ContextResolverBasic
focal_class.var_name: contextResolver
focal_class.declarator: paramsResolver
focal_class.modifier: @Autowired
  	@Qualifier("rmparamsResolver")
focal_class.original_string: @Autowired
  	@Qualifier("rmparamsResolver")
  	ParamsResolver paramsResolver;
focal_class.type: ParamsResolver
focal_class.var_name: paramsResolver
focal_class.declarator: csourceDAO
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired
  	CSourceDAO csourceDAO;
focal_class.type: CSourceDAO
focal_class.var_name: csourceDAO
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: httpUtils
focal_class.modifier: private
focal_class.original_string: private HttpUtils httpUtils;
focal_class.type: HttpUtils
focal_class.var_name: httpUtils
focal_class.file: Registry/RegistryManager/src/main/java/eu/neclab/ngsildbroker/registryhandler/controller/RegistryController.java
focal_class.identifier: RegistryController
focal_class.class_method_signature: RegistryController.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: RegistryController.discoverCSource(HttpServletRequest request,
  			@RequestParam HashMap<String, String> queryMap)
focal_class.full_signature: @GetMapping public ResponseEntity<byte[]> discoverCSource(HttpServletRequest request,
  			@RequestParam HashMap<String, String> queryMap)
focal_class.identifier: discoverCSource
focal_class.modifiers: @GetMapping public
focal_class.parameters: (HttpServletRequest request,
  			@RequestParam HashMap<String, String> queryMap)
focal_class.return: ResponseEntity<byte[]>
focal_class.signature: ResponseEntity<byte[]> discoverCSource(HttpServletRequest request,
  			@RequestParam HashMap<String, String> queryMap)
focal_class.class_method_signature: RegistryController.registerCSource(HttpServletRequest request,
  			@RequestBody(required = false) String payload)
focal_class.full_signature: @PostMapping public ResponseEntity<byte[]> registerCSource(HttpServletRequest request,
  			@RequestBody(required = false) String payload)
focal_class.identifier: registerCSource
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[]> registerCSource(HttpServletRequest request,
  			@RequestBody(required = false) String payload)
focal_class.class_method_signature: RegistryController.getCSourceById(HttpServletRequest request,
  			@PathVariable("registrationId") String registrationId)
focal_class.full_signature: @GetMapping("{registrationId}") public ResponseEntity<byte[]> getCSourceById(HttpServletRequest request,
  			@PathVariable("registrationId") String registrationId)
focal_class.identifier: getCSourceById
focal_class.modifiers: @GetMapping("{registrationId}") public
focal_class.parameters: (HttpServletRequest request,
  			@PathVariable("registrationId") String registrationId)
focal_class.return: ResponseEntity<byte[]>
focal_class.signature: ResponseEntity<byte[]> getCSourceById(HttpServletRequest request,
  			@PathVariable("registrationId") String registrationId)
focal_class.class_method_signature: RegistryController.updateCSource(HttpServletRequest request,
  			@PathVariable("registrationId") String registrationId, @RequestBody String payload)
focal_class.full_signature: @PatchMapping("{registrationId}") public ResponseEntity<byte[]> updateCSource(HttpServletRequest request,
  			@PathVariable("registrationId") String registrationId, @RequestBody String payload)
focal_class.identifier: updateCSource
focal_class.modifiers: @PatchMapping("{registrationId}") public
focal_class.parameters: (HttpServletRequest request,
  			@PathVariable("registrationId") String registrationId, @RequestBody String payload)
focal_class.return: ResponseEntity<byte[]>
focal_class.signature: ResponseEntity<byte[]> updateCSource(HttpServletRequest request,
  			@PathVariable("registrationId") String registrationId, @RequestBody String payload)
focal_class.class_method_signature: RegistryController.deleteCSource(@PathVariable("registrationId") String registrationId)
focal_class.full_signature: @DeleteMapping("{registrationId}") public ResponseEntity<byte[]> deleteCSource(@PathVariable("registrationId") String registrationId)
focal_class.identifier: deleteCSource
focal_class.modifiers: @DeleteMapping("{registrationId}") public
focal_class.parameters: (@PathVariable("registrationId") String registrationId)
focal_class.return: ResponseEntity<byte[]>
focal_class.signature: ResponseEntity<byte[]> deleteCSource(@PathVariable("registrationId") String registrationId)
focal_class.class_method_signature: RegistryController.validate(String payload)
focal_class.full_signature: private void validate(String payload)
focal_class.identifier: validate
focal_class.modifiers: private
focal_class.parameters: (String payload)
focal_class.return: void
focal_class.signature: void validate(String payload)
focal_method.body: @DeleteMapping("{registrationId}")
  	public ResponseEntity<byte[]> deleteCSource(@PathVariable("registrationId") String registrationId) {
  		try {
  			logger.debug("delete CSource() ::" + registrationId);
  			csourceService.deleteCSourceRegistration(registrationId);
  			logger.debug("delete CSource() completed::" + registrationId);
  			return ResponseEntity.noContent().build();
  		} catch (ResponseException exception) {
  			return ResponseEntity.status(exception.getHttpStatus()).body(new RestResponse(exception).toJsonBytes());
  		} catch (Exception e) {
  			return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
  					.body(new RestResponse(ErrorType.InternalError, e.getLocalizedMessage()).toJsonBytes());
  		}
  	}
focal_method.class_method_signature: RegistryController.deleteCSource(@PathVariable("registrationId") String registrationId)
focal_method.full_signature: @DeleteMapping("{registrationId}") public ResponseEntity<byte[]> deleteCSource(@PathVariable("registrationId") String registrationId)
focal_method.identifier: deleteCSource
focal_method.invocations: debug deleteCSourceRegistration debug build noContent body status getHttpStatus toJsonBytes body status toJsonBytes getLocalizedMessage
focal_method.modifiers: @DeleteMapping("{registrationId}") public
focal_method.parameters: (@PathVariable("registrationId") String registrationId)
focal_method.return: ResponseEntity<byte[]>
focal_method.signature: ResponseEntity<byte[]> deleteCSource(@PathVariable("registrationId") String registrationId)