    @Test
    public void handleRequest_SimpleFailure() throws IOException, AlertApiException {

        CreateHandler createHandler = new CreateHandler(alertApiClient);

        // do some before assertions
        assertThat(model.getNrqlCondition().getId()).isNull();
        assertThat(model.getNrqlCondition().getName()).isEqualTo("TestNRQLCondition");

        // oh no, bad request! Throw an exception.
        when(alertApiClient.create(
                        any(NewRelicNrqlCondition.class), any(String.class), any(Integer.class)))
                .thenThrow(AlertApiException.class);

        final ResourceHandlerRequest<ResourceModel> request =
                ResourceHandlerRequest.<ResourceModel>builder().desiredResourceState(model).build();
        final ProgressEvent<ResourceModel, CallbackContext> response =
                createHandler.handleRequest(proxy, request, null, logger);

        // Our final response should be a failure
        assertThat(response.getStatus()).isEqualTo(OperationStatus.FAILED);

        // Our model should be unchanged
        assertThat(model.getNrqlCondition().getId()).isNull();
        assertThat(model.getNrqlCondition().getName()).isEqualTo("TestNRQLCondition");
    }