Adding print CTS tests for print job page ranges.
1. Refactored the CTS tests to extract the common functionality
in a base print test class.
2. Refactored how a print service is mocked to allow mocking of
the print service and the printer discovery sessions it creates.
The print service and the printer discovery session are abstract
classes with final and package private APIs. Also the print service
is instantiated by the system. Hence, we cannot just create mocks
via mockito for these classes. Instead the callback part of the
service and session APIs are factored as mockable classes, i.e.
ones with no final members and package private APIs. These mocks
are created and set into the hosting print service and printer
discovery session.
3. Added tests for the print job pages as a function of what pages
were requested from the app and which it actually wrote.
4. Fixed a hardcoded path in DocletRunner for UiAutomator as the
latter was moved. This was breaking UiAutomator based CTS tests.
Change-Id: I638087046219b292089f5010b85d1a4100631cc3
12 files changed