### Question:
GCMProvider extends AbstractPushNotificationProvider implements NotificationProvider { @SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void notifyCustomer(Notification notification) throws DispatchException, DispatchUnsupportedByUserException { Map<String, BaseEntity<?, ?>> additionalEntityParams = NotificationProviderUtil.addAdditionalParamsAndReturnRecipient(placeDao, personDao, accountDao, notification); Person recipient = NotificationProviderUtil.getPersonFromParams(additionalEntityParams); if (recipient == null) { throw new DispatchUnsupportedByUserException("No person found with id: " + notification.getPersonId()); } if (notification.getDeliveryEndpoint() != null) { Map<String, Object> payload = new HashMap<String, Object>(); Map notificationData = JSON.fromJson(messageRenderer.renderMessage(notification, NotificationMethod.GCM, recipient, additionalEntityParams), Map.class); if (notification.getMessageParams() != null && notification.getMessageParams().containsKey(ADDRESS_PARAM_KEY)) { notificationData.put("address", notification.getMessageParams().get(ADDRESS_PARAM_KEY)); } if (notification.getMessageParams() != null && notification.getMessageParams().containsKey(TARGET_PARAM_KEY)) { notificationData.put("target", notification.getMessageParams().get(TARGET_PARAM_KEY)); } if (additionalEntityParams.containsKey(NotificationProviderUtil.PLACE_KEY)) { notificationData.put("place_id", String.valueOf(((Place) additionalEntityParams.get(NotificationProviderUtil.PLACE_KEY)).getId())); notificationData.put("place_name", ((Place) additionalEntityParams.get(NotificationProviderUtil.PLACE_KEY)).getName()); } payload.put("data", notificationData); logger.debug("sending gcm notification to {}", notification.getDeliveryEndpoint()); sender.sendMessage(notification, notification.getDeliveryEndpoint(), payload); } else { for (String thisDevice : getDeviceTokensForPerson(notification.getPersonId(), MobileOS.ANDROID)) { retryProcessor.split(notification, NotificationMethod.GCM, thisDevice); } } }  @SuppressWarnings({ "rawtypes", "unchecked" }) @Override void notifyCustomer(Notification notification);  }### Answer:
@Test public void testNotifyCustomer() throws Exception { Map<String, Object> expectedPayload = new HashMap<String, Object>(); Object notificationData = JSON.fromJson(renderedMessage, Map.class); expectedPayload.put("data", notificationData); gcmProvider.notifyCustomer(notification); Mockito.verify(retryProcessor).split(notification, NotificationMethod.GCM, "android1-token"); Mockito.verify(retryProcessor).split(notification, NotificationMethod.GCM, "android2-token"); }