Merge "Use assertFailsWith to verify exception cases"