Added tests that check for exceptions being thrown on invalid data

Change-Id: I3f0f21dd34c0557a5b7c718739881545a23b8207
Merge "Added tests that check for exceptions being thrown on invalid data"