use expect instead of assert fail for unit test throwing exceptions