Code reformatted to comply with the convention, increased minApi for tests to 3.

Used android-formatting on code.
Tests reformatted to use given-when-then template.
Increased minimal API for tests to 3 in order to overcome Eclipse's errors.