@Test
public void test_throwIfNotSuccessful_InvalidHTMLResponse() {

    final Response htmlResponse =
            buildMockResponse(OPC_REQUEST_ID, HTML_MEDIA_TYPE, BAD_GATEWAY_STATUS);
    try {
        ResponseHelper.throwIfNotSuccessful(htmlResponse);
        fail("Should have thrown");
    } catch (BmcException exception) {
        validateExceptionFields(
                exception,
                OPC_REQUEST_ID,
                BAD_GATEWAY_STATUS,
                "Unknown",
                "Unexpected Content-Type: " + HTML_MEDIA_TYPE);
    }
}