# `Jido.Chat.AdapterTestKit.MockState`
[🔗](https://github.com/agentjido/jido_chat/blob/v1.2.0/lib/jido/chat/adapter_test_kit/mock_state.ex#L1)

A small deterministic state process for adapter tests.

Each process keeps its initial snapshot so a test can reset it without global
application state.

# `server`

```elixir
@type server() :: GenServer.server()
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `get`

```elixir
@spec get(server(), term(), term()) :: term()
```

Gets one key from the current state.

# `put`

```elixir
@spec put(server(), term(), term()) :: :ok
```

Puts one key in the current state.

# `reset`

```elixir
@spec reset(server()) :: :ok
```

Restores the initial state snapshot.

# `snapshot`

```elixir
@spec snapshot(server()) :: map()
```

Returns the current state snapshot.

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

Starts a mock state process.

# `update`

```elixir
@spec update(server(), (map() -&gt; map())) :: map()
```

Updates the current state and returns the new snapshot.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
