code: public static GroupCommunicationMessage getGCM(final Message<GroupCommunicationMessage> msg) {
      final Iterator<GroupCommunicationMessage> gcmIterator = msg.getData().iterator();
      if (gcmIterator.hasNext()) {
        final GroupCommunicationMessage gcm = gcmIterator.next();
        if (gcmIterator.hasNext()) {
          throw new RuntimeException("Expecting exactly one GCM object inside Message but found more");
        }
        return gcm;
      } else {
        throw new RuntimeException("Expecting exactly one GCM object inside Message but found none");
      }
    }
docs: Extract a group communication message object from a message.
  @param msg
  @return