@Override
    public Optional<String> getPlacementGroup() {
        return awsMetadataApi.placementGroupEc2();
    }
@Test
    public void getPlacementGroup() {
        // given
        String placementGroup = "placement-group";
        String partitionNumber = "42";
        given(awsMetadataApi.placementGroupEc2()).willReturn(Optional.of(placementGroup));
        given(awsMetadataApi.placementPartitionNumberEc2()).willReturn(Optional.of(partitionNumber));

        // when
        Optional<String> placementGroupResult = awsEc2Client.getPlacementGroup();
        Optional<String> partitionNumberResult = awsEc2Client.getPlacementPartitionNumber();

        // then
        assertEquals(placementGroup, placementGroupResult.orElse("N/A"));
        assertEquals(partitionNumber, partitionNumberResult.orElse("N/A"));
    }