@Test
public void testGetErrorWithCause() throws Exception
{

    Exception ex = new Exception();
    ErrorInformation errorInformation = exceptionHandler.handleBadRequestException(ex);
    assertTrue(errorInformation.getMessageDetails().size() == 0);
    
    ex = new Exception(new Exception("cause_1_exception", new Exception("cause_2_exception")));
    errorInformation = exceptionHandler.handleBadRequestException(ex);
    
    assertTrue(errorInformation.getMessageDetails().size() == 2);
    assertEquals("cause_1_exception", errorInformation.getMessageDetails().get(0));
    assertEquals("cause_2_exception", errorInformation.getMessageDetails().get(1));
}