# Creating MockBox

```javascript
mockBox = new testbox.system.MockBox();

// Within a TestBox Spec
getMockBox()
```

The factory takes in one constructor argument that is not mandatory: `generationPath`. This path is a relative path of where the factory generates internal mocking stubs that are included later on at runtime. Therefore, the path must be a path that can be used using `cfinclude`. The default path the mock factory uses is the following, so you do not have to specify one, just make sure the path has WRITE permissions:

```javascript
/testbox/system/stubs
```

> **Hint** If you are using Lucee or ACF10+ you can also decide to use the `ram://` resource and place all generated stubs in memory.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://testbox.ortusbooks.com/mocking/mockbox/creating-mockbox.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
