### Question:
ResumeOrchestrationRequest { protected HashMap<String, String> setInstanceIdMap(InfraActiveRequests infraActiveRequest, String requestScope) { HashMap<String, String> instanceIdMap = new HashMap<>(); ModelType type; try { type = ModelType.valueOf(requestScope); instanceIdMap.put(type.name() + "InstanceId", type.getId(infraActiveRequest)); } catch (IllegalArgumentException e) { logger.error("requestScope \"{}\" does not match a ModelType enum.", requestScope); } return instanceIdMap; }  @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 setInstanceIdMapServiceTest() { HashMap<String, String> expected = new HashMap<>(); expected.put("serviceInstanceId", SERVICE_INSTANCE_ID); HashMap<String, String> result = resumeReq.setInstanceIdMap(infraActiveRequest, SERVICE); assertEquals(result, expected); }
@Test public void setInstanceIdMapRequestScopeNotValidTest() { HashMap<String, String> expected = new HashMap<>(); HashMap<String, String> result = resumeReq.setInstanceIdMap(infraActiveRequest, "test"); assertEquals(result, expected); }
@Test public void setInstanceIdMapVnfTest() { HashMap<String, String> expected = new HashMap<>(); expected.put("vnfInstanceId", VNF_ID); HashMap<String, String> result = resumeReq.setInstanceIdMap(infraActiveRequest, VNF); assertEquals(result, expected); }
@Test public void setInstanceIdMapVfModuleTest() { HashMap<String, String> expected = new HashMap<>(); expected.put("vfModuleInstanceId", VFMODULE_ID); HashMap<String, String> result = resumeReq.setInstanceIdMap(infraActiveRequest, VFMODULE); assertEquals(result, expected); }
@Test public void setInstanceIdMapNetworkTest() { HashMap<String, String> expected = new HashMap<>(); expected.put("networkInstanceId", NETWORK_ID); HashMap<String, String> result = resumeReq.setInstanceIdMap(infraActiveRequest, NETWORK); assertEquals(result, expected); }
@Test public void setInstanceIdMapVolumeGroupTest() { HashMap<String, String> expected = new HashMap<>(); expected.put("volumeGroupInstanceId", VOLUME_GROUP_ID); HashMap<String, String> result = resumeReq.setInstanceIdMap(infraActiveRequest, VOLUME_GROUP); assertEquals(result, expected); }