Making robolectric work with all latest libraries versions

This PR should enable robolectric tests. Let me know if you need further information.