At Square, verifying the behavior of our applications is an essential part of our day-to-day development — and to make testing easier, we have created and refined a set of tools for three different aspects of testing; unit tests, instrumentation tests, and declaring assertions. **public** **class** **SquaredImageViewTest** **{** @Test **public** **void** **squaredImageViewStaysSquare()** **{** Activity context **=** **new** **Activity();** SquaredImageView view **=** **new** **SquaredImageView(**context**);** // Manually measure the view at 200x100. While unit tests are useful for testing everything from UI behavior to complex, low-level internals of your application, sometimes it is useful to verify behavior at a higher level.