@Test
public void should_set_exception_type_as_type() throws Exception {

    Exception illegalArgumentException = new IllegalArgumentException("an error message");
    ErrorMessage errorMessage = new ErrorMessage(illegalArgumentException);
    assertThat(errorMessage.getType()).isEqualTo("IllegalArgumentException");
}