AwsCredentials credentialsEcs() {
        String response = createRestClient(ecsIamRoleEndpoint, awsConfig).get().getBody();
        return parseCredentials(response);
    }
@Test
    public void credentialsEcs() {
        // given
        String response = """
                {
                  "Code": "Success",
                  "AccessKeyId": "Access1234",
                  "SecretAccessKey": "Secret1234",
                  "Token": "Token1234",
                  "Expiration": "2020-03-27T21:01:33Z"
                }""";
        stubFor(get(urlEqualTo("/"))
            .willReturn(aResponse().withStatus(HttpURLConnection.HTTP_OK).withBody(response)));

        // when
        AwsCredentials result = awsMetadataApi.credentialsEcs();

        // then
        assertEquals("Access1234", result.getAccessKey());
        assertEquals("Secret1234", result.getSecretKey());
        assertEquals("Token1234", result.getToken());
    }