Add exception checking to previously modified tests Reviewed-by: sspitsyn, cjplummer
Added missing tests and fixed the code Reviewed-by: cjplummer, sspitsyn, amenkov