Refactored test (don't catch unexpected exception).