public static void withLaunchPreventingStartActivityListenerInDependencyResolver() {
    StartActivityListener mockListener = Mockito.mock(StartActivityListener.class);
    doReturn(true)
        .when(mockListener)
        .onStartActivityInvoked(Mockito.anyObject(), Mockito.anyObject());
    DependencyInjector.setStartActivityListener(mockListener);
  }
Configures the {@link DependencyInjector} with a {@link StartActivityListener} that prevents
activity launches.
javatests/com/google/android/apps/authenticator/testing/TestUtilities.java