Distribute extends AbstractAppCenterService { public static void setListener(DistributeListener listener) { }  static synchronized Distribute getInstance(); static AppCenterFuture<Boolean> isEnabled(); static AppCenterFuture<Void> setEnabled(boolean enabled); static void setInstallUrl(String installUrl); static void setApiUrl(String apiUrl); static int getUpdateTrack(); static void setUpdateTrack(@UpdateTrack int updateTrack); static void setListener(DistributeListener listener); static void setEnabledForDebuggableBuild(boolean enabled); static void notifyUpdateAction(@UpdateAction int updateAction); static void checkForUpdate(); static void disableAutomaticCheckForUpdate(); @Override String getServiceName(); @Override Map<String, LogFactory> getLogFactories(); @Override synchronized void onStarted(@NonNull Context context, @NonNull Channel channel, String appSecret, String transmissionTargetToken, boolean startedFromApp); @Override synchronized void onActivityResumed(Activity activity); @Override synchronized void onActivityPaused(Activity activity); @Override void onApplicationEnterForeground();  }
@Test public void setListenerTest() { DistributeListener mockListener = mock(DistributeListener.class); Activity mockActivity = mock(Activity.class); ReleaseDetails mockRelease = mock(ReleaseDetails.class); Distribute.setListener(mockListener); mockListener.onReleaseAvailable(mockActivity, mockRelease); }