class HasException extends GenericMatcher {

    @Override
    public void init() throws MessagingException {
        try {
            String exceptionClassName = getCondition().trim();
            this.exceptionClass = castToThrowable(Class.forName(exceptionClassName));
        } catch (ClassNotFoundException e) {
            throw new MessagingException("Specified exception class not found.", e);
        }
    }

}