@Before
public void setUp() throws Exception {
ClassLoader classloader = Thread.currentThread().getContextClassLoader();
classloader.getResource(SHAPE_FILE);
FeatureInfo ft = new FeatureInfo();
ft.setDataSourceName("filtertest");
PrimitiveAttributeInfo ia = new PrimitiveAttributeInfo();
ia.setLabel("id");
ia.setName("Id");
ia.setType(PrimitiveType.STRING);
ft.setIdentifier(ia);
GeometryAttributeInfo ga = new GeometryAttributeInfo();
ga.setName("the_geom");
ga.setEditable(false);
ft.setGeometryType(ga);
List<AttributeInfo> attr = new ArrayList<AttributeInfo>();
PrimitiveAttributeInfo pa = new PrimitiveAttributeInfo();
pa.setLabel("textAttr");
pa.setName("textAttr");
pa.setEditable(false);
pa.setIdentifying(true);
pa.setType(PrimitiveType.STRING);
attr.add(pa);
PrimitiveAttributeInfo pa2 = new PrimitiveAttributeInfo();
pa2.setLabel("numberAttr");
pa2.setName("numberAttr");
pa2.setEditable(false);
pa2.setIdentifying(true);
pa2.setType(PrimitiveType.INTEGER);
attr.add(pa2);
ft.setAttributes(attr);
VectorLayerInfo layerInfo = new VectorLayerInfo();
layerInfo.setFeatureInfo(ft);
layerInfo.setCrs("EPSG:4326");