CSHARP-476: Added comprehensive unit tests.