This was supported, so I will let you know what we eventually developed.
We wrote a plugin using the API for another application. When the plugin is deployed, it gains access to all application definitions. However, unit tests work in isolation, so specific classes that are defined only through interfaces and factories cannot be built.
In this example:
Coord3 c3 = Coords.coord(1.0f, 2.0f, 3.0f);
Both Coord3 and Coords are defined. But com / lgc / infra / geometry / Coord1Val, which is used in Coords, is not really defined in our path to the library (the API box was obviously built with it there, but it was not provided).
There are several possible workarounds that, we hope, smart people stumbling over this issue will comment on some of them. The one we went with is to wrap Coords in a mockable factory that returns mock (Coord3.class), so that the parts that demonstrate this problem are encapsulated.
source share