### Question:
InfraActiveRequestsRepositoryCustomController { @PostMapping(value = "/infraActiveRequests/checkInstanceNameDuplicate") public InfraActiveRequests checkInstanceNameDuplicate( @RequestBody InstanceNameDuplicateCheckRequest instanceNameDuplicateCheckRequest) { return infraActiveRequestsRepository.checkInstanceNameDuplicate( instanceNameDuplicateCheckRequest.getInstanceIdMap(), instanceNameDuplicateCheckRequest.getInstanceName(), instanceNameDuplicateCheckRequest.getRequestScope()); }  @PostMapping(value = "/infraActiveRequests/getCloudOrchestrationFiltersFromInfraActive") List<InfraActiveRequests> getCloudOrchestrationFiltersFromInfraActive(
            @RequestBody Map<String, String> orchestrationMap); @PostMapping(value = "/infraActiveRequests/getOrchestrationFiltersFromInfraActive") List<InfraActiveRequests> getOrchestrationFiltersFromInfraActive(
            @RequestBody Map<String, List<String>> orchestrationMap); @GetMapping(value = "/infraActiveRequests/checkVnfIdStatus/{operationalEnvironmentId}") InfraActiveRequests checkVnfIdStatus(
            @PathVariable("operationalEnvironmentId") String operationalEnvironmentId); @PostMapping(value = "/infraActiveRequests/checkInstanceNameDuplicate") InfraActiveRequests checkInstanceNameDuplicate(
            @RequestBody InstanceNameDuplicateCheckRequest instanceNameDuplicateCheckRequest); @PostMapping(value = "/infraActiveRequests/v1/getInfraActiveRequests") List<InfraActiveRequests> getInfraActiveRequests(@RequestBody Map<String, String[]> filters,
            @RequestParam("from") long startTime, @RequestParam("to") long endTime,
            @RequestParam(value = "maxResult", required = false) Integer maxResult); @GetMapping(value = "/infraActiveRequests/getInProgressVolumeGroupsAndVfModules") List<InfraActiveRequests> getInProgressVolumeGroupsAndVfModules();  }### Answer:
@Test public void checkInstanceNameDuplicateTest() { InstanceNameDuplicateCheckRequest instanceNameDuplicateCheckRequest = new InstanceNameDuplicateCheckRequest((HashMap<String, String>) null, infraActiveRequests.getOperationalEnvName(), infraActiveRequests.getRequestScope()); HttpEntity<InstanceNameDuplicateCheckRequest> entityList = new HttpEntity(instanceNameDuplicateCheckRequest, headers); UriComponentsBuilder builder = UriComponentsBuilder .fromHttpUrl(createURLWithPort("/infraActiveRequests") + "/checkInstanceNameDuplicate"); ResponseEntity<InfraActiveRequests> response = restTemplate.exchange(builder.toUriString(), HttpMethod.POST, entityList, new ParameterizedTypeReference<InfraActiveRequests>() {}); infraActiveRequestsResponse = response.getBody(); assertEquals(200, response.getStatusCodeValue()); verifyInfraActiveRequests(); }