@Test
 public void shouldContainOnlyTheDefinedAnalyzers() throws Exception {
   Map<String, AnalyzerReference> analyzerReferences =
       ((SearchFactoryState) sfHolder.getSearchFactory()).getAnalyzerReferences();
   assertThat(analyzerReferences.keySet())
       .containsOnly(
           "package-analyzer-1", "package-analyzer-2", "class-analyzer-1", "class-analyzer-2");
 }
 private List<EntityInfo> runProjection(Query query, String fieldName) {
   return sfHolder
       .getSearchFactory()
       .createHSQuery()
       .luceneQuery(query)
       .targetedEntities(Arrays.asList(new Class<?>[] {SomeEntity.class}))
       .projection(fieldName)
       .queryEntityInfos();
 }
  private void storeData(String title, int value, Integer nullableAge) {
    SomeEntity entry = new SomeEntity();
    entry.title = title;
    entry.age = value;
    entry.nullableAge = nullableAge;

    Work work = new Work(entry, entry.title, WorkType.ADD, false);
    TransactionContextForTest tc = new TransactionContextForTest();
    sfHolder.getSearchFactory().getWorker().performWork(work, tc);
    tc.end();
  }
 private QueryBuilder getQueryBuilder() {
   return sfHolder.getSearchFactory().buildQueryBuilder().forEntity(SomeEntity.class).get();
 }
 private void assertThatAnalyzerExists(String analyzerName) {
   Analyzer analyzer = sfHolder.getSearchFactory().getAnalyzer(analyzerName);
   assertThat(analyzer).isNotNull();
 }