activity will be created by testActivity method, so you will be only able to find views after that. Although you will be able to retrieve the view after that, you should do all assertions inside this method to improve error messages.
I also have lifted assertions on initial state of views to the lazy initialization. The reason for this is that JUnit does not promises to stick with any ordering of @Test methods, so it is better to do it every time the view is used in a test. The @Tests that are focused on just doing that assertion are still there so that it is easier for the user to isolate that issue while running tests mannually.
only did stage3, follow this pattern on other stages
activity will be created by testActivity method, so you will be only able to find views after that. Although you will be able to retrieve the view after that, you should do all assertions inside this method to improve error messages.
I also have lifted assertions on initial state of views to the lazy initialization. The reason for this is that JUnit does not promises to stick with any ordering of @Test methods, so it is better to do it every time the view is used in a test. The @Tests that are focused on just doing that assertion are still there so that it is easier for the user to isolate that issue while running tests mannually.
only did stage3, follow this pattern on other stages