Q:

Applying JUnit Rules to UiAutomator tests

I am currently working on some UiAutomator testcases which will run in a huge test-system. 
I must do some Ui-walking before each testcase starts. In what ways is this possible? 
I have investigated JUnit Rules, but it seems like those are meant for static usage(?), which is n/a to my usecase. My pseudo-code of what I want to accomplish follows below.    
public class TestCases extends UiAutomator{ 
@Before
public void setCorrectUi() { getUiDevice().makeMeLaugh();}
@Test
public void setWallpaper() { getUiDevice().makeMeCry();  }
}

Are there any JUnit Rules which can be applied after instantiation of testclasses?
Are there any cleaner more appropriate ways of accomplishing this?
I know I could put my pseudo     @Before in a testcase, but since that is not inside the testscope I don't want to do this. 
Grateful for answers! :)

A:

Android Testcase uses Junit3, you are provided with setup and teardown methods to accomplish this. You can refer this docs

