private boolean facetExists(final String facetName, final Collection<? extends Facet> facets) {
    for (Facet facet : facets) {
      if (getFacetName(facet).equals(facetName)) {
        return true;
      }
    }
    return false;
  }
private boolean facetExists(final String facetName, final Collection<? extends Facet> facets)