Adds unit tests for the PeripheralAPIServer, covering initialization, state management, command dispatching, and event emission.