Add tests for DiagnosticsEngine and Diagnostic.