}
@Test
public void testSelectionTransfering() throws Exception{
Display display=Display.getCurrent();
Clipboard cp=new Clipboard(display);
SimpleFeature[] features = UDIGTestUtil.createDefaultTestFeatures("test", 1); //$NON-NLS-1$
FilterFactory factory= CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());
SimpleFeatureType featureType = features[0].getFeatureType();
BoundingBox bounds = features[0].getBounds();
CoordinateReferenceSystem crs= featureType.getCoordinateReferenceSystem();
BBOX filter = factory.bbox(featureType.getGeometryDescriptor().getName().getLocalPart(), bounds.getMinX(),
bounds.getMinY(), bounds.getMaxX(), bounds.getMaxY(), CRS.lookupIdentifier(crs, false));
cp.setContents(new Object[]{filter},new Transfer[]{UDigByteAndLocalTransfer.getInstance()});
assertSame(filter, cp.getContents(UDigByteAndLocalTransfer.getInstance()));
// cp.setContents(new Object[]{filter},new Transfer[]{FilterTextTransfer.getInstance()});
// Filter contents = (Filter) cp.getContents(FilterTextTransfer.getInstance());
// // There is some sort of bug in the filter parser or the Filter.equals that make the two not be equal
// // so this is a work around because my code is correct.