Transmission #062: Inventory on the Character Endpoint — Unit Tests

The character GET endpoint now returns inventory items alongside the stub character data. This session added unit tests to lock in the mapping chain that makes that work.

What changed

Three new mapper tests and one API-impl test were added — all pure unit tests with no database or container dependency:

Characters API integration test

CharactersApiIntegrationTest was added alongside the existing ItemsApiIntegrationTest, using the same generated OpenAPI client and JerseyLiveStackSupport base. Three cases:

loadInventory returns Optional

InventoryRepository.loadInventory previously called .getFirst() and would throw NoSuchElementException for owners with no inventory record. It now uses fetchOptionalInto and returns Optional<InternalInventory>. CharactersApiImpl.getCharacter maps the Optional — present → 200 with items, empty → clean 404 via ApiUtils.notFound().