InAppMessageManager { @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public void onMessageScheduleFinished(@NonNull final String scheduleId) { executor.execute(new Runnable() { @Override public void run() { assetManager.onFinish(scheduleId); } }); } @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)  InAppMessageManager(@NonNull Context context,
                               @NonNull PreferenceDataStore dataStore,
                               @NonNull Analytics analytics,
                               @NonNull Delegate delegate); @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)  InAppMessageManager(@NonNull Context context,
                        @NonNull PreferenceDataStore dataStore,
                        @NonNull Analytics analytics,
                        @NonNull RetryingExecutor executor,
                        @NonNull ActionRunRequestFactory runRequestFactory,
                        @NonNull AssetManager assetManager,
                        @NonNull Delegate delegate); void setAdapterFactory(@NonNull @InAppMessage.DisplayType String displayType, @Nullable InAppMessageAdapter.Factory factory); void setDisplayInterval(@IntRange(from = 0) long time, @NonNull TimeUnit timeUnit); long getDisplayInterval(); @NonNull AssetManager getAssetManager(); void addListener(@NonNull InAppMessageListener listener); void removeListener(@NonNull InAppMessageListener listener); void setMessageExtender(@Nullable InAppMessageExtender extender); void setOnRequestDisplayCoordinatorCallback(@Nullable OnRequestDisplayCoordinatorCallback callback); @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) void onAirshipReady(); @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) void onPrepare(final @NonNull String scheduleId,
                          final @NonNull InAppMessage inAppMessage,
                          final @NonNull AutomationDriver.PrepareScheduleCallback callback); @MainThread @AutomationDriver.ReadyResult @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) int onCheckExecutionReadiness(@NonNull String scheduleId); @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) @MainThread void onExecute(@NonNull String scheduleId, @NonNull AutomationDriver.ExecutionCallback callback); @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) void onExecutionInvalidated(@NonNull final String scheduleId); @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) void onMessageScheduleFinished(@NonNull final String scheduleId); @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) void onNewMessageSchedule(@NonNull final String scheduleId, @NonNull final InAppMessage message); static final long DEFAULT_DISPLAY_INTERVAL_MS; }
@Test public void testNotifyScheduleFinished() { manager.onMessageScheduleFinished(scheduleId); verify(mockAssetManager, times(1)).onFinish(scheduleId); }