code: private static void assertConsumer(InteractionUnit unit, Map<QName, Set<Procedure>> behaviours, IntegrityErrors err) {
  
          Set<Resource<ResourceType>> producedTypes = unit.getOutputs();
  
          for (Resource<ResourceType> resource : producedTypes) {
              boolean match = false;
  
              for(QName id : behaviours.keySet())
              {
                  for (Behaviour behaviour : behaviours.get(id)) {
  
                      if (behaviour.doesConsume(resource)) {
                          match = true;
                          break;
                      }
                  }
              }
              if (!match)
                  err.add(unit.getId(), "Missing consumer for <<" + resource + ">>");
          }
  
      }
docs: Assertion that a consumer exists for the produced resources of an interaction unit.
  
  @param unit
  @param err