class AndroidMocks {

    public static Activity mockActivity(Application application) {
        Activity activity = mockActivity();
        when(activity.getApplication()).thenReturn(application);
        return activity;
    }

}