code: public void write(EntitySet entitySet) throws XMLStreamException {
  
          LOG.debug("Writing entity set {} of type {}", entitySet.getName(), entitySet.getTypeName());
  
          xmlWriter.writeStartElement(ENTITY_SET);
          xmlWriter.writeAttribute(NAME, entitySet.getName());
          xmlWriter.writeAttribute(ENTITY_TYPE, entitySet.getTypeName());
          for (NavigationPropertyBinding navPropertyBinding : entitySet.getNavigationPropertyBindings()) {
              xmlWriter.writeStartElement(NAVIGATION_PROPERTY_BINDING);
              xmlWriter.writeAttribute(PATH, navPropertyBinding.getPath());
              xmlWriter.writeAttribute(TARGET, navPropertyBinding.getTarget());
              xmlWriter.writeEndElement();
          }
          xmlWriter.writeEndElement();
      }
docs: Write an {@code <EntitySet>} element for a given {@code EntitySet}.
  
  @param entitySet The given {@code EntitySet}. It can not be {@code null}.
  @throws javax.xml.stream.XMLStreamException If unable to write to stream