elasticsearch/elasticsearch — pull request #2972 by spinscale (2013-05-02 13:05:29+00:00)
Title: Added a first set of hamcrest matchers

A first implementation of adding matchers and helper methods to elasticsearch, open for comments and discussion.

The following ones are supported

```
assertHitCount(searchResponse, 2);

// helper methods to easily access the first hits
assertFirstHit(searchResponse, hasId("foo")):
assertSecondHit(searchResponse, hasType("foo")):
assertThirdHit(searchResponse, hasIndex("foo")):

// methods to access all other hits
assertSearchHit(searchResponse, 5, hasId("10"));
// same as above, but maybe more readable
assertSearchHit(searchResponse.getHits().getAt(4), hasIndex("foo"));
```

I changed GeoFilterTests to show how it works.

Furthermore I inlined `assertHighlight()` from HighlighterSearchTests.
The ElasticsearchAssertions class should be used now as an assertion class
in order have a centralized class for every developer to look at.