@Test
public void mockActivityWithApplication() {

    Application application = mock(Application.class);
    Activity activity = AndroidMocks.mockActivity(application);
    assertThat(activity).isNotNull();
    assertThat(activity.getApplication()).isEqualTo(application);
}