Added support for Robolectric and modified tests to suit it

Do we have to change the min and max sdk versions for roboelectric?