@Test
public void testHandleAmazonExceptionWithBadRequestException()
{

    try
    {
        AmazonServiceException amazonServiceException = new AmazonServiceException(ERROR_MESSAGE);
        amazonServiceException.setStatusCode(HttpStatus.SC_BAD_REQUEST);
        awsServiceHelper.handleAmazonException(amazonServiceException, MESSAGE_TEXT);
        fail();
    }
    catch (IllegalArgumentException illegalArgumentException)
    {
        assertThat("Error message not correct.", illegalArgumentException.getMessage().contains(MESSAGE_TEXT), is(true));
    }
}