code: public static void present(final Map<?, ?> map, final Object key, final String name)
      {
          if (null == map.get(key))
          {
              throw new IllegalStateException(name + " not found in map for key: " + key);
          }
      }
docs: Verify that a map contains an entry for a given key.
  
  @param map  to be checked.
  @param key  to get by.
  @param name of entry.
  @throws NullPointerException  if map or key is null
  @throws IllegalStateException if the entry does not exist.