Hi there I am new to Android Junit testing:
I have written some test code in MainActivityFunctionalTest.java file
MainActivityFunctionalTest.java:
for a rooted device, this file helped me a lot. It has:
Injector.pressBackButton(); Injector.pressHomeButton(); Injector.pressPowerButton(); Injector.showNotificationCenter(); Injector.swipeLeftRight(); Injector.swipeRightLeft(); Injector.touch(x, y);