PushNotificationRegistration implements InternalRegistrationProgressListener { @Override public void onSuccessfulRegistration(String clientId, Context context) { subscriptionManager = factory.newSubscriptionManager(clientId, context, appKey, options); subscriptionManager.sendSubscriptions(pendingSubscriptions); pendingSubscriptions = Collections.synchronizedList(new ArrayList<Subscription>()); } PushNotificationRegistration(
            String appKey,
            PusherAndroidOptions options,
            PusherAndroidFactory factory,
            ManifestValidator manifestValidator
    ); @Deprecated void registerGCM(Context context, String defaultSenderId); @Deprecated void registerGCM(
            Context context,
            String defaultSenderId,
            final PushNotificationRegistrationListener registrationListener); @Deprecated void registerFCM(Context context, final PushNotificationRegistrationListener listener); @Deprecated void registerFCM(Context context); @Deprecated void subscribe(String interest); @Deprecated void subscribe(final String interest, final InterestSubscriptionChangeListener listener); @Deprecated void unsubscribe(String interest); @Deprecated void unsubscribe(final String interest, final InterestSubscriptionChangeListener listener); @Deprecated void setGCMListener(GCMPushNotificationReceivedListener listener); @Deprecated void setFCMListener(FCMPushNotificationReceivedListener listener); @Override void onSuccessfulRegistration(String clientId, Context context); @Override void onFailedRegistration(int statusCode, String reason); static String GCM_CALLED_INTENT_FILTER; static String TOKEN_EXTRA_KEY; }
@Test public void testSubscriptionManagerCreatedOnSuccessfulRegistration() { registration.onSuccessfulRegistration("client-id-woot", context); verify(factory).newSubscriptionManager("client-id-woot", context, "superkey", options); verify(subscriptionManager).sendSubscriptions( Matchers.anyListOf(Subscription.class) ); }