function createMockDocument(initialContent, languageId, filename) {
        var language    = LanguageManager.getLanguage(languageId) || LanguageManager.getLanguage("javascript"),
            options     = { language: language, content: initialContent, filename: filename },
            docToShim   = createMockActiveDocument(options);

        // Prevent adding doc to global 'open docs' list; prevents leaks or collisions if a test
        // fails to clean up properly (if test fails, or due to an apparent bug with afterEach())
        docToShim.addRef = function () {};
        docToShim.releaseRef = function () {};
        docToShim._ensureMasterEditor = function () {
            if (!this._masterEditor) {
                // Don't let Document create an Editor itself via EditorManager; the unit test can't clean that up
                throw new Error("Use create/destroyMockEditor() to test edit operations");
            }
        };

        return docToShim;
    }
Returns a Document suitable for use with an Editor in isolation: i.e., a Document that will
never be set as the currentDocument or added to the working set.

Unlike a real Document, does NOT need to be explicitly cleaned up.

@param {?string} initialContent  Defaults to ""
@param {?string} languageId      Defaults to JavaScript
@param {?string} filename        Defaults to an auto-generated filename with the language's extension