code: @SuppressWarnings("unchecked")
      public <T extends Item> void publish(T item) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
          Collection<T> items = new ArrayList<>(1);
          items.add((item == null ? (T) new Item() : item));
          publish(items);
      }
docs: Publishes an event to the node.  This can be either a simple item
  with no payload, or one with it.  This is determined by the Node
  configuration.
  
  If the node has <b>deliver_payload=false</b>, the Item must not
  have a payload.
  
  If the id is null, an empty item (one without an id) will be sent.
  Please note that this is not the same as {@link #send()}, which
  publishes an event with NO item.
  
  @param item - The item being sent
  @param <T> type of the items.
  
  @throws XMPPErrorException
  @throws NoResponseException
  @throws NotConnectedException
  @throws InterruptedException