source: class CreateHandlerTest {
  
      @Mock
      private AmazonWebServicesClientProxy proxy;
      @Mock
      private Logger logger;
      final CreateHandler handler;
      final ResourceModel model;
      final ResourceHandlerRequest<ResourceModel> request;
  
      @Test
      public void handleRequest_InvalidParameter_Failure() {
  
target:         doThrow(InvalidParameterException.class)
                  .when(proxy)
                  .injectCredentialsAndInvokeV2(any(), any());
  
          assertThrows(CfnInvalidRequestException.class,
                  () -> handler.handleRequest(proxy, request, null, logger));
      }
  
  }