@Test
public void shouldLaunchIntentForPassedActivity() {

    AuthenticationRequest authenticationRequest = mock(AuthenticationRequest.class);
    Activity activity = mock(Activity.class);
    when(authenticationRequest.toUri()).thenReturn(Uri.parse("to://me"));
    Mockito.doNothing().when(activity).startActivity(any(Intent.class));
    ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class);
    AuthenticationClient.openLoginInBrowser(activity, authenticationRequest);
    verify(activity, times(1)).startActivity(captor.capture());
    assertEquals(Intent.ACTION_VIEW, captor.getValue().getAction());
    assertEquals("to://me", captor.getValue().getData().toString());
}