Narrow the return types to API types in tests.

This should drastically reduce the number of internal “hits” in plugins.
Yeah, fixing organize imports would be nice :) It does all sorts of bizarre things with the sources.