I was seeking for test frameworks for Android UI automation and I stumbled upon `UI Automator` and `Espresso` and this is the part I am confused about -

1. Both are maintained by Google
2. Both are used for functional UI testing
3. Both are `Android` only frameworks

So my questions/doubts here are -

* What is the major difference between `UI Automator` and `Espresso`?
* Will the source code have to be modified to integrate any of these frameworks?
* Does one framework hold any advantage over the other? If yes, then which framework is the most suitable for UI automation of an Android app?