### Question:
AAIClientHelper { public void updateAaiOperationalEnvironment(String id, OperationalEnvironment aaiRequest) { AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().operationalEnvironment(id)); AAIResourcesClient client = this.getClient(); client.update(uri, aaiRequest); }  AAIResultWrapper getAaiOperationalEnvironment(String id); void updateAaiOperationalEnvironment(String id, OperationalEnvironment aaiRequest); void updateAaiOperationalEnvironment(String operationalEnvironmentId, Map<String, String> payload); void createOperationalEnvironment(OperationalEnvironment operationalEnvironment); void createRelationship(String managingEcompOperationalEnvironmentId, String vnfOperationalEnvironmentId);  }### Answer:
@Test public void testUpdateSuccess() { wireMockServer.stubFor( post(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*")) .willReturn(aResponse().withHeader("Content-Type", "application/json") .withStatus(HttpStatus.SC_ACCEPTED))); OperationalEnvironment ecompEnv = new OperationalEnvironment(); ecompEnv.setTenantContext("Test"); ecompEnv.setWorkloadContext("ECOMPL_PSL"); try { AAIClientHelper clientHelper = mock(AAIClientHelper.class); doNothing().when(clientHelper).updateAaiOperationalEnvironment(any(String.class), any(OperationalEnvironment.class)); clientHelper.updateAaiOperationalEnvironment("EMOE-001", ecompEnv); verify(clientHelper, times(1)).updateAaiOperationalEnvironment("EMOE-001", ecompEnv); } catch (Exception e) { fail("shouldn't reach here"); } }
@Test public void testUpdateMapSuccess() { wireMockServer.stubFor( post(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*")) .willReturn(aResponse().withHeader("Content-Type", "application/json") .withStatus(HttpStatus.SC_ACCEPTED))); Map<String, String> payload = new HashMap<String, String>(); payload.put("tenant-context", "Test"); payload.put("workload-context", "ECOMPL_PSL"); payload.put("operational-environment-status", "ACTIVE"); try { AAIClientHelper clientHelper = mock(AAIClientHelper.class); doNothing().when(clientHelper).updateAaiOperationalEnvironment("EMOE-001", payload); clientHelper.updateAaiOperationalEnvironment("EMOE-001", payload); verify(clientHelper, times(1)).updateAaiOperationalEnvironment("EMOE-001", payload); } catch (Exception e) { fail("shouldn't reach here"); } }