@Test
public void testGetBusinessObjectDataStorageFilesCreateResponse400BadContentThrows() throws Exception
{

    int expectedStatusCode = 400;
    String expectedReasonPhrase = "testReasonPhrase";
    String expectedErrorMessage = "invalid xml";
    CloseableHttpResponse httpResponse =
        new MockCloseableHttpResponse(new BasicStatusLine(HttpVersion.HTTP_1_1, expectedStatusCode, expectedReasonPhrase), false);
    httpResponse.setEntity(new StringEntity(expectedErrorMessage));
    try
    {
        executeWithoutLogging(DataBridgeWebClient.class, () -> {
            dataBridgeWebClient.getBusinessObjectDataStorageFilesCreateResponse(httpResponse);
        });
        Assert.fail("expected HttpErrorResponseException, but no exception was thrown");
    }
    catch (Exception e)
    {
        assertEquals("thrown exception type", HttpErrorResponseException.class, e.getClass());
        HttpErrorResponseException httpErrorResponseException = (HttpErrorResponseException) e;
        assertEquals("httpErrorResponseException responseMessage", expectedErrorMessage, httpErrorResponseException.getResponseMessage());
        assertEquals("httpErrorResponseException statusCode", expectedStatusCode, httpErrorResponseException.getStatusCode());
        assertEquals("httpErrorResponseException statusDescription", expectedReasonPhrase, httpErrorResponseException.getStatusDescription());
        assertEquals("httpErrorResponseException message", "Failed to add storage files", httpErrorResponseException.getMessage());
    }
}