class Cake {

  public String getPublishedKeyForValue(Object value, boolean fullyQualified) {
    List<String> matchingKeys =
        entries.entrySet().stream()
            .filter(e -> e.getValue().equals(value))
            .map(Map.Entry::getKey)
            .collect(Collectors.toList());
    if (matchingKeys.size() == 1) {
      if (fullyQualified) {
        return matchingKeys.get(0);
      }
      String[] splitKey = StringUtils.split(matchingKeys.get(0), Cake.SEPARATOR);
      return splitKey[splitKey.length - 1];
    }
    if (matchingKeys.size() > 1) {
      throw new IllegalArgumentException("multiple keys found for object " + value);
    }
    throw new IllegalArgumentException("no key found for object " + value);
  }

  public  Cake();
  public  Cake(Cake other);

}