Check for error when test method parameter is pass-by-reference