code: public <T extends Mapping> T findMapping(MappingType type, Predicate<T> predicate)
      {
          T mapping = getMapping(type);
          if (mapping != null)
          {
  
              // check predicate: can invalidate the local mapping
              if (predicate != null)
              {
                  mapping = (predicate.appliesTo(mapping)) ? mapping : null;
              }
  
              // complement the mapping (i.e. resource address at a higher level)
              if(mapping!=null && parent!=null)
              {
                  Mapping parentMapping = parent.findMapping(type, predicate);
                  if(parentMapping!=null)
                  {
                      mapping.complementFrom(parentMapping);
                  }
              }
  
          }
  
          if (mapping == null && parent != null)
          {
              mapping = (T) parent.findMapping(type, predicate);
          }
  
          return mapping;
      }
docs: Finds the first mapping of a type within the hierarchy.
  Uses parent delegation if the mapping cannot be found locally.
  <p/>
  The predicate needs to apply.
  
  @param type
  @param predicate Use {@code null} to ignore
  @return