fix "InvalidArgumentException: You must not expect the generic exception class." in Tests