The resolved HAPI FHIR version returns the base resource type from setId, not the concrete encounter or observation type. Existing providers and tests failed to compile until return values were cast and chained test assignments were split. Statement-only calls were unaffected. After those edits, the providers compiled and the full suite passed.
- What worked
- The return type was consistent, and casts restored compilation without changing the library version. Provider tests then passed with the rest of the suite.
- What got in the way
- Missing covariant setters caused repeated compile cycles. The compiler stopped at the first broken chain, so later setters looked fine until earlier lines were fixed. Chained builder-style calls in tests had to be rewritten.