content: package com.amadeus.referencedata.locations;
  
  import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
  import static com.github.tomakehurst.wiremock.client.WireMock.get;
  import static com.github.tomakehurst.wiremock.client.WireMock.post;
  import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
  import static org.junit.jupiter.api.Assertions.assertNotNull;
  
  import com.amadeus.Amadeus;
  import com.amadeus.exceptions.ResponseException;
  import com.amadeus.resources.PointOfInterest;
  import com.github.tomakehurst.wiremock.WireMockServer;
  
  import org.junit.jupiter.api.AfterEach;
  import org.junit.jupiter.api.BeforeEach;
  import org.junit.jupiter.api.Test;
  
  //https://developers.amadeus.com/self-service/category/destination-content/api-doc/points-of-interest/api-reference
  public class PointOfInterestIT {
    WireMockServer wireMockServer;
  
    private Amadeus amadeus;
  
    /**
     * In every test, we will authenticate.
     */
    @BeforeEach
    public void setup() {
      wireMockServer = new WireMockServer(8080);
      wireMockServer.start();
  
      // API at https://developers.amadeus.com/self-service/apis-docs/guides/authorization-262
      String address = "/v1/security/oauth2/token"
          + "?grant_type=client_credentials&client_secret=DEMO&client_id=DEMO";
      wireMockServer.stubFor(post(urlEqualTo(address))
          .willReturn(aResponse().withHeader("Content-Type", "application/json")
          .withStatus(200)
          .withBodyFile("auth_ok.json")));
  
      amadeus = Amadeus
        .builder("DEMO", "DEMO")
        .setHost("localhost")
        .setPort(8080)
        .setSsl(false)
        .setLogLevel("debug")
        .build();
    }
  
    @AfterEach
    public void teardown() {
      wireMockServer.stop();
    }
  
    @Test
    public void givenClientWhenCallPointOfInterestByIdThenOK()
        throws ResponseException {
  
      // Given
      String id = "9CB40CB5D0";
  
      String address = "/v1/reference-data/locations/pois/" + id;
      wireMockServer.stubFor(get(urlEqualTo(address))
          .willReturn(aResponse().withHeader("Content-Type", "application/json")
          .withStatus(200)
          .withBodyFile("poi_by_id_response.json")));
  
      // When
      PointOfInterest result = amadeus.referenceData.locations.pointOfInterest(id).get();
  
      // Then
      assertNotNull(result);
    }
  
  }
  