Currently you would instantiate a Sling Model in a unit test leveraging Sling Mocks via
In case for some reason the model cannot be instantiated it is hard to debug why (because by default the reason is only emitted in the log with level DEBUG). To ease debugging it would be nice if ModelFactory (
SLING-3709) could be used, as that throws an explicit exception in case of instantiation errrors. It would be nice to give direct access to that service directly from the SlingContext.