Some minor nits about tests in general that I've also noticed in the past:
IMO, unit tests can be too low level. They can also be too fragile.
The test below is a pain to maintain... it essentially means you can't change the schema at all w/o breaking the test.
+ Map<String,FieldType> polyFs = schema.getPolyFieldTypes();
+ assertTrue(polyFs.size() == 3);
I also prefer testing low level behavior as opposed to testing low level implementation.
It would be nice, for example, if testPointFieldType indexed a few couments (with various combinations of stored / indexed) and then queried the index, with our high level xpath validation code to test that the field was correctly matched and had stored, or had not stored the value.
Rendundant null checks, trivial strings, etc:
+ assertNotNull("topDocs is null", topDocs);
+ assertTrue(topDocs.totalHits + " does not equal: " + 1, topDocs.totalHits == 1)
Things like the above can be replaced with the much more concise and readable:
But really, stuff like this:
+ TopDocs topDocs = core.getSearcher().get().search(bq, 1);
Should normally use the higher level search and xpath validate functionallity. The code above actually leads to a refcount leak.
schema.xml: geo will be core... let's not add a new/different schema file in tests for this and simply add it to the latest schema12