File indexLocation;
protected void setUp() throws Exception {
this.controller = new IndexController();
GDataServerRegistry reg = GDataServerRegistry.getRegistry();
this.indexLocation = new File(System.getProperty("java.io.tmpdir"));
ProvidedServiceStub stub = new ProvidedServiceStub();
this.schema = new IndexSchema();
// must be set
this.schema.setDefaultSearchField("content");
this.schema.setName(ProvidedServiceStub.SERVICE_NAME);
this.schema.setIndexLocation(this.indexLocation.getAbsolutePath());
IndexSchemaField field = new IndexSchemaField();
field.setName("content");
field.setPath("/somePath");
field.setContentType(ContentType.TEXT);
this.schema.addSchemaField(field);
stub.setIndexSchema(this.schema);
reg.registerService(stub);
}