Add test case for #688

Please use `setExpectedException` in the test instead.