public String getEndpoint() {
    String format = isOutposts() ? S3_OUTPOSTS_ACCESSPOINT_ENDPOINT_FORMAT : S3_ACCESSPOINT_ENDPOINT_FORMAT;
    return String.format(format, region);
  }
@Test
  public void makeSureS3OutpostsEndpointHasTheCorrectFormat() {
    // Access point (AP) endpoints are different from S3 bucket endpoints, thus when using APs the
    // endpoints for the client are modified. This test makes sure endpoint is set up correctly.
    ArnResource accessPoint = getArnResourceFrom("aws", "s3-outposts", "eu-west-1", MOCK_ACCOUNT,
        "test");
    String expected = "s3-outposts.eu-west-1.amazonaws.com";

    Assertions.assertThat(accessPoint.getEndpoint())
        .describedAs("Endpoint has invalid format. Access Point requests will not work")
        .isEqualTo(expected);
  }