Robolectric

A framework for writing unit tests in Android Studio. Allows you to write simple JUnit tests for methods and classes in a project, and test the UI. You can even combine UI and unit tests in one test class, which allows you to test all the Activity functionality in one place without running the emulator.