@Test
public void testSearchContextAttributes() throws SearchException {

	SearchContext searchContext = new SearchContext();
	searchContext.setAttribute(
		ElasticsearchSearchContextAttributes.
			ATTRIBUTE_KEY_SEARCH_REQUEST_PREFERENCE,
		"testValue");
	searchContext.setAttribute(
		SearchContextAttributes.ATTRIBUTE_KEY_BASIC_FACET_SELECTION,
		Boolean.TRUE);
	searchContext.setAttribute(
		SearchContextAttributes.ATTRIBUTE_KEY_LUCENE_SYNTAX, Boolean.TRUE);
	SearchSearchRequest searchSearchRequest =
		_elasticsearchIndexSearcher.createSearchSearchRequest(
			_searchRequestBuilderFactory.builder(
				searchContext
			).build(),
			searchContext, Mockito.mock(Query.class), 0, 0);
	Assert.assertTrue(searchSearchRequest.isBasicFacetSelection());
	Assert.assertTrue(searchSearchRequest.isLuceneSyntax());
	Assert.assertEquals("testValue", searchSearchRequest.getPreference());
}