Optional<String> placementGroupEc2() {
        return getOptionalMetadata(ec2MetadataEndpoint.concat("/placement/group-name/"), "placement group");
    }
@Test
    public void placementGroupEc2() {
        // given
        String placementGroup = "placement-group-1";
        stubFor(get(urlEqualTo(GROUP_NAME_URL))
                .willReturn(aResponse().withStatus(HttpURLConnection.HTTP_OK).withBody(placementGroup)));

        // when
        Optional<String> result = awsMetadataApi.placementGroupEc2();

        // then
        assertEquals(placementGroup, result.orElse("N/A"));
        verify(exactly(1), getRequestedFor(urlEqualTo(GROUP_NAME_URL)));
    }