### Question:
VolumeRestHandler extends AbstractRestHandler { public void checkDuplicateRequest(String serviceInstanceId, String vnfInstanceId, String volumeGroupId, String instanceName, String requestId) { HashMap<String, String> instanceIdMap = new HashMap<>(); instanceIdMap.put("serviceInstanceId", serviceInstanceId); instanceIdMap.put("vnfInstanceId", vnfInstanceId); instanceIdMap.put("volumeGroupInstanceId", volumeGroupId); checkDuplicateRequest(instanceIdMap, ModelType.volumeGroup, instanceName, requestId); }  InfraActiveRequests mapInfraActiveRequestForDelete(String requestId, String volumeGroupId,
            String serviceInstanceId, String vnfId, String requestorId, String source, String requestURL); InfraActiveRequests createInfraActiveRequestForDelete(String requestId, String volumeGroupId,
            String serviceInstanceId, String vnfId, String requestorId, String source, String requestURL); RequestClientParameter buildRequestParams(ServiceInstancesRequest request, String requestURI,
            String requestId, String serviceInstanceId, String vnfId, String volumeGroupId); void saveInstanceName(ServiceInstancesRequest request, InfraActiveRequests currentRequest); void checkDuplicateRequest(String serviceInstanceId, String vnfInstanceId, String volumeGroupId,
            String instanceName, String requestId);  }### Answer:
@Test public void test_checkDuplicateRequest() throws MalformedURLException, NoRecipeException { ArgumentCaptor<HashMap> instanceIdCaptor = ArgumentCaptor.forClass(HashMap.class); restHandler.checkDuplicateRequest("serviceInstanceId", "vnfId", "volumeGroupId", "instanceName", "requestId"); Mockito.verify(infraActiveRequestsClient, Mockito.times(1)).checkInstanceNameDuplicate( instanceIdCaptor.capture(), eq("instanceName"), eq(ModelType.volumeGroup.toString())); Map actualMap = instanceIdCaptor.getValue(); assertEquals("ServiceInstanceID should exist in map", "serviceInstanceId", actualMap.get("serviceInstanceId")); assertEquals("VnfId should exit in map", "vnfId", actualMap.get("vnfInstanceId")); assertEquals("VolumeGroupId should exit in map", "volumeGroupId", actualMap.get("volumeGroupInstanceId")); }