### Question:
ResumeOrchestrationRequest { protected String getInstanceName(InfraActiveRequests infraActiveRequest, String requestScope, InfraActiveRequests currentActiveRequest) throws ValidateException, RequestDbFailureException { ModelType type; String instanceName = ""; try { type = ModelType.valueOf(requestScope); instanceName = type.getName(infraActiveRequest); } catch (IllegalArgumentException e) { logger.error("requestScope \"{}\" does not match a ModelType enum.", requestScope); ValidateException validateException = new ValidateException.Builder( "requestScope: \"" + requestScope + "\" from request: " + infraActiveRequest.getRequestId() + " does not match a ModelType enum.", HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_BAD_PARAMETER).cause(e).build(); requestHandlerUtils.updateStatus(currentActiveRequest, Status.FAILED, validateException.getMessage()); throw validateException; } return instanceName; }  @POST @Path("/{version:[vV][7]}/{requestId}/resume") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @Operation(description = "Resume request for a given requestId", responses = @ApiResponse( content = @Content(array = @ArraySchema(schema = @Schema(implementation = Response.class))))) @Transactional Response resumeOrchestrationRequest(@PathParam("requestId") String requestId,
            @PathParam("version") String version, @Context ContainerRequestContext requestContext);  }### Answer:
@Test public void setInstanceNameServiceTest() throws ValidateException, RequestDbFailureException { String result = resumeReq.getInstanceName(infraActiveRequest, SERVICE, currentActiveRequest); assertEquals(result, SERVICE_INSTANCE_NAME); }
@Test public void setInstanceNameRequestScopeNotValidTest() throws ValidateException, RequestDbFailureException { thrown.expect(ValidateException.class); thrown.expectMessage( "requestScope: \"test\" from request: 00032ab7-na18-42e5-965d-8ea592502019 does not match a ModelType enum."); resumeReq.getInstanceName(infraActiveRequest, "test", currentActiveRequest); }
@Test public void setInstanceNameVnfTest() throws ValidateException, RequestDbFailureException { String result = resumeReq.getInstanceName(infraActiveRequest, VNF, currentActiveRequest); assertEquals(result, VNF_NAME); }
@Test public void setInstanceNameVfModuleTest() throws ValidateException, RequestDbFailureException { String result = resumeReq.getInstanceName(infraActiveRequest, VFMODULE, currentActiveRequest); assertEquals(result, VFMODULE_NAME); }
@Test public void setInstanceNameNetworkTest() throws ValidateException, RequestDbFailureException { String result = resumeReq.getInstanceName(infraActiveRequest, NETWORK, currentActiveRequest); assertEquals(result, NETWORK_NAME); }
@Test public void setInstanceNameVolumeGroupTest() throws ValidateException, RequestDbFailureException { String result = resumeReq.getInstanceName(infraActiveRequest, VOLUME_GROUP, currentActiveRequest); assertEquals(result, VOLUME_GROUP_NAME); }