### Question:
MsoRequest { protected String getTenantNameFromAAI(ServiceInstancesRequest servInsReq) { String tenantName = null; if (servInsReq.getRequestDetails() != null && servInsReq.getRequestDetails().getCloudConfiguration() != null && servInsReq.getRequestDetails().getCloudConfiguration().getTenantId() != null) { Tenant tenant = aaiDataRet.getTenant(servInsReq.getRequestDetails().getCloudConfiguration().getCloudOwner(), servInsReq.getRequestDetails().getCloudConfiguration().getLcpCloudRegionId(), servInsReq.getRequestDetails().getCloudConfiguration().getTenantId()); if (tenant != null) { tenantName = tenant.getTenantName(); } } return tenantName; }  Response buildServiceErrorResponse(int httpResponseCode, MsoException exceptionType, String errorText,
            String messageId, List<String> variables, String version); void parse(ServiceInstancesRequest sir, Map<String, String> instanceIdMap, Actions action, String version,
            String originalRequestJSON, int reqVersion, Boolean aLaCarteFlag); Map<String, List<String>> getOrchestrationFilters(MultivaluedMap<String, String> queryParams); InfraActiveRequests createRequestObject(ServiceInstancesRequest servInsReq, Actions action, String requestId,
            Status status, String originalRequestJSON, String requestScope); InfraActiveRequests createRequestObject(TasksRequest taskRequest, Action action, String requestId,
            Status status, String originalRequestJSON); void createErrorRequestRecord(Status status, String requestId, String errorMessage, Actions action,
            String requestScope, String requestJSON, String serviceInstanceId); Response buildResponse(int httpResponseCode, String errorCode, InfraActiveRequests inProgress); Response buildResponseWithError(int httpResponseCode, String errorCode, InfraActiveRequests inProgress,
            String errorString); Response buildResponseFailedValidation(int httpResponseCode, String exceptionMessage); String getServiceType(VnfInputs vnfInputs); long translateStatus(RequestStatusType status); static String domToStr(Document doc); void addBPMNSpecificInputs(VnfRequest vnfReq, VnfInputs vnfInputs, String personaModelId,
            String personaModelVersion, Boolean isBaseVfModule, String vnfPersonaModelId,
            String vnfPersonaModelVersion); String getRequestJSON(ServiceInstancesRequest sir); boolean getAlacarteFlag(ServiceInstancesRequest sir); String getNetworkType(ServiceInstancesRequest sir, String requestScope); String getServiceInstanceType(ServiceInstancesRequest sir, String requestScope); String getSDCServiceModelVersion(ServiceInstancesRequest sir); String getVfModuleType(ServiceInstancesRequest sir, String requestScope); String getVnfType(ServiceInstancesRequest sir, String requestScope);  }### Answer:
@Test public void getTenantNameFromAAITest() throws Exception { this.sir = mapper.readValue(inputStream("/SuccessfulValidation/ServiceAssign.json"), ServiceInstancesRequest.class); String tenantId = "88a6ca3ee0394ade9403f075db23167e"; String tenantNameFromAAI = "testTenantName"; String cloudRegion = "mdt1"; String cloudOwner = "cloudOwner"; this.sir.getRequestDetails().getCloudConfiguration().setCloudOwner(cloudOwner); Tenant tenant = new Tenant(); tenant.setTenantId(tenantId); tenant.setTenantName(tenantNameFromAAI); doReturn(tenant).when(aaiDataRet).getTenant(cloudOwner, cloudRegion, tenantId); String tenantName = msoRequestMock.getTenantNameFromAAI(this.sir); assertEquals(tenantNameFromAAI, tenantName); }