Replaced stub assertions with exception throws