LegacyInAppMessageManager extends AirshipComponent { public void setScheduleBuilderExtender(@Nullable ScheduleBuilderExtender scheduleBuilderExtender) { this.scheduleBuilderExtender = scheduleBuilderExtender; } @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)  LegacyInAppMessageManager(@NonNull Context context,
                                     @NonNull PreferenceDataStore preferenceDataStore,
                                     @NonNull InAppAutomation inAppAutomation,
                                     @NonNull Analytics analytics,
                                     @NonNull PushManager push); @NonNull static LegacyInAppMessageManager shared(); @Override @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) @AirshipComponentGroups.Group int getComponentGroup(); void setMessageBuilderExtender(@Nullable MessageBuilderExtender messageBuilderExtender); void setScheduleBuilderExtender(@Nullable ScheduleBuilderExtender scheduleBuilderExtender); void setDisplayAsapEnabled(boolean enabled); boolean getDisplayAsapEnabled(); static final int DEFAULT_PRIMARY_COLOR; static final int DEFAULT_SECONDARY_COLOR; static final float DEFAULT_BORDER_RADIUS_DP; }
@Test public void testScheduleExtenderException() { legacyInAppMessageManager.setScheduleBuilderExtender(new LegacyInAppMessageManager.ScheduleBuilderExtender() { @NonNull @Override public Schedule.Builder extend(@NonNull Context context, @NonNull Schedule.Builder builder, @NonNull LegacyInAppMessage legacyMessage) { throw new RuntimeException("exception!"); } }); pushListener.onPushReceived(pushMessage, true); verifyZeroInteractions(inAppAutomation); }