@Test
public void determineNegationTermsPresent() throws Exception
{

    IndexSearchRequest indexSearchRequest = new IndexSearchRequest();
    indexSearchRequest.setSearchTerm(" -foo");
    Assert.assertTrue(herdSearchQueryHelper.determineNegationTermsPresent(indexSearchRequest));
    indexSearchRequest.setSearchTerm("foo -bar foobar");
    Assert.assertTrue(herdSearchQueryHelper.determineNegationTermsPresent(indexSearchRequest));
    indexSearchRequest.setSearchTerm(" ");
    Assert.assertFalse(herdSearchQueryHelper.determineNegationTermsPresent(indexSearchRequest));
    indexSearchRequest.setSearchTerm("-bar");
    Assert.assertFalse(herdSearchQueryHelper.determineNegationTermsPresent(indexSearchRequest));
    indexSearchRequest.setSearchTerm("foo bar");
    Assert.assertFalse(herdSearchQueryHelper.determineNegationTermsPresent(indexSearchRequest));
    indexSearchRequest.setSearchTerm("foo-bar");
    Assert.assertFalse(herdSearchQueryHelper.determineNegationTermsPresent(indexSearchRequest));
}