AccengageNotificationProvider implements NotificationProvider { @NonNull @Override public NotificationArguments onCreateNotificationArguments(@NonNull Context context, @NonNull PushMessage message) { AccengageMessage accengageMessage = AccengageMessage.fromAirshipPushMessage(message); String requestedChannelId = accengageMessage.getAccengageChannel(); String activeChannelId = NotificationChannelUtils.getActiveChannel(requestedChannelId, DEFAULT_NOTIFICATION_CHANNEL); return NotificationArguments.newBuilder(message) .setNotificationChannelId(activeChannelId) .setNotificationId(String.valueOf(accengageMessage.getAccengageSystemId()), accengageMessage.getAccengageSystemId()) .build(); }  @NonNull @Override NotificationArguments onCreateNotificationArguments(@NonNull Context context, @NonNull PushMessage message); @NonNull @Override NotificationResult onCreateNotification(@NonNull Context context, @NonNull NotificationArguments arguments); @Override void onNotificationCreated(@NonNull Context context, @NonNull Notification notification, @NonNull NotificationArguments arguments);  }
@Test public void testOnCreateNotificationArguments() { Application application = ApplicationProvider.getApplicationContext(); Context context = Mockito.spy(application); Bundle extras = new Bundle(); extras.putString("a4scontent", "accengageContent"); extras.putInt("a4ssysid", 77); extras.putString("a4stitle", "title test"); PushMessage pushMessage = new PushMessage(extras); AccengageMessage message = AccengageMessage.fromAirshipPushMessage(pushMessage); AccengageNotificationProvider accengageNotificationProvider = new AccengageNotificationProvider(); NotificationArguments arguments = accengageNotificationProvider.onCreateNotificationArguments(context, pushMessage); Assert.assertEquals("com.urbanairship.default", arguments.getNotificationChannelId()); Assert.assertEquals(77, arguments.getNotificationId()); }