Add tests for model search interface

Model level testing for the elasticsearch integration. The setTimeout
call in the refreshElasticsearchIndex call is necessary because
elasticsearch gives an error about a missing index if you try to refresh
immediately.