code: @SuppressWarnings("unchecked")
      private <T> Callback<T> getFirstCallback(BeanMessageID type) {
          List<Callback<?>> callbacks = beanCallbacks.get(type);
          if (callbacks == null || callbacks.isEmpty()) {
              Log.w(TAG, "Got response without callback!");
              return null;
          }
          return (Callback<T>) callbacks.remove(0);
      }
docs: Get the first callback for a Bean message type.
  
  @param type  The {@link com.punchthrough.bean.sdk.internal.BeanMessageID} for which to find
  an associated callback
  @param <T>   The parameter type for the callback
  @return      The callback for the given message type, or null if none exists