public void testCreatedPalette() {
   final Palette palette = myTransformationResult.getDiagram().getPalette();
   for (TopNodeReference topNode : getMapping().getNodes()) {
     final NodeMapping nodeMapping = topNode.getChild();
     GenTopLevelNode genNode = myTransformer.getTrace().findTopNode(nodeMapping);
     assertNotNull(genNode);
     assertEquals(nodeMapping.getTool() != null ? 1 : 0, countUses(genNode, palette));
   }
   for (LinkMapping linkMapping : getMapping().getLinks()) {
     GenLink genLink = myTransformer.getTrace().find(linkMapping);
     assertNotNull(genLink);
     assertEquals(linkMapping.getTool() != null ? 1 : 0, countUses(genLink, palette));
   }
   // TODO add grooping test
 }
 public static List<EReference> filterByReferenceType(
     Collection<EReference> eReferences, LinkMapping linkMapping) {
   EClass referenceType = linkMapping.getDomainMetaElement();
   return sort(getEReferences(getEReferencesOfType(eReferences, referenceType), true));
 }