### Question:
AuthenticatorManager { PushNotification handleMessage(RemoteMessage message) throws InvalidNotificationException { Logger.debug(TAG, "Processing FCM remote message."); if(notificationFactory != null) { return notificationFactory.handleMessage(message); } else { Logger.warn(TAG, "Attempt to process Push Notification has failed. " + "FCM token was not provided during SDK initialization."); throw new InvalidNotificationException("Cannot process Push notification. " + "FCM token was not provided during SDK initialization."); } } AuthenticatorManager(Context context, StorageClient storageClient, String deviceToken);   }### Answer:
@Test public void testShouldHandleMessageAsParameters() throws Exception { RemoteMessage remoteMessage = generateMockRemoteMessage(MESSAGE_ID, CORRECT_SECRET, generateBaseMessage()); String messageId = remoteMessage.getData().get("messageId"); String message = remoteMessage.getData().get("message"); PushNotification pushNotification = authenticatorManager.handleMessage(messageId, message); assertNotNull(pushNotification); assertEquals(MESSAGE_ID, pushNotification.getMessageId()); assertEquals(CHALLENGE, pushNotification.getChallenge()); assertEquals(new String(Base64.decode(AMLB_COOKIE, Base64.NO_WRAP)), pushNotification.getAmlbCookie()); assertEquals(MECHANISM_UID, pushNotification.getMechanismUID()); assertEquals(TTL, pushNotification.getTtl()); }
@Test public void testShouldHandleRemoteMessage() throws Exception { RemoteMessage remoteMessage = generateMockRemoteMessage(MESSAGE_ID, CORRECT_SECRET, generateBaseMessage()); PushNotification pushNotification = authenticatorManager.handleMessage(remoteMessage); assertNotNull(pushNotification); assertEquals(MESSAGE_ID, pushNotification.getMessageId()); assertEquals(CHALLENGE, pushNotification.getChallenge()); assertEquals(new String(Base64.decode(AMLB_COOKIE, Base64.NO_WRAP)), pushNotification.getAmlbCookie()); assertEquals(MECHANISM_UID, pushNotification.getMechanismUID()); assertEquals(TTL, pushNotification.getTtl()); }