renamed throws to doesThrow