CSHARP-1013: Add tests for custom exceptions.