Trim error message and use adapter in test to get the error reporting value (ping @jubianchi ;)).