@Test
public void handleRequest_imageCreationNotYetStabilized_success_available() {

    List<software.amazon.awssdk.services.imagebuilder.model.Ami> amis= new LinkedList<>();
    amis.add(software.amazon.awssdk.services.imagebuilder.model.Ami.builder().image("id-sfo").region("us-west-1").build());
    amis.add(software.amazon.awssdk.services.imagebuilder.model.Ami.builder().image("id-iad").region("us-east-1").build());
    amis.add(software.amazon.awssdk.services.imagebuilder.model.Ami.builder().image("id-pdx").region("us-west-2").build());
    amis.add(software.amazon.awssdk.services.imagebuilder.model.Ami.builder().image("id-cmh").region("us-east-2").build());
    final GetImageResponse getImageResponse = GetImageResponse.builder()
            .image(Image.builder()
                    .arn(generateImageForTest().arn())
                    .outputResources(OutputResources.builder().amis(amis).build())
                    .state((ImageState.builder()
                            .status(ImageStatus.AVAILABLE.toString())
                            .build()))
                    .build())
            .build();
    final ResourceHandlerRequest<ResourceModel> request = ResourceHandlerRequest.<ResourceModel>builder()
            .region("us-west-2")
            .desiredResourceState(model)
            .build();
    final CallbackContext inputContext = CallbackContext.builder()
            .imageCreationInvoked(true)
            .build();
    final CallbackContext outputContext = CallbackContext.builder()
            .imageCreationInvoked(true)
            .build();
    doReturn(getImageResponse)
            .when(proxy)
            .injectCredentialsAndInvokeV2(any(GetImageRequest.class), any());
    final ProgressEvent<ResourceModel, CallbackContext> response
            = handler.handleRequest(proxy, request, inputContext, logger);
    assertThat(response).isNotNull();
    assertThat(response.getStatus()).isEqualTo(OperationStatus.SUCCESS);
    assertThat(response.getCallbackContext()).isNull();
    assertThat(response.getCallbackDelaySeconds()).isEqualTo(0);
    ResourceModel returnModel = response.getResourceModel();
    assertThat(returnModel.getArn()).isEqualTo(generateImageForTest().arn());
    assertThat(returnModel.getImageId()).isEqualTo("id-pdx");
    assertThat(response.getResourceModels()).isNull();
    assertThat(response.getMessage()).isNull();
    assertThat(response.getErrorCode()).isNull();
}