Add tests for ThrownException.