@Test
  public void shouldReturnSimilarEntities() {
    // given
    String sampleMessage =
        "So we build a web site or an application and want to add search to it, "
            + "and then it hits us: getting search working is hard. We want our search solution to be fast,"
            + " we want a painless setup and a completely free search schema, we want to be able to index data simply using JSON over HTTP, "
            + "we want our search server to be always available, we want to be able to start with one machine and scale to hundreds, "
            + "we want real-time search, we want simple multi-tenancy, and we want a solution that is built for the cloud.";

    List<SampleEntity> sampleEntities = createSampleEntitiesWithMessage(sampleMessage, 30);
    repository.save(sampleEntities);

    // when
    Page<SampleEntity> results =
        repository.searchSimilar(
            sampleEntities.get(0), new String[] {"message"}, new PageRequest(0, 5));

    // then
    assertThat(results.getTotalElements(), is(greaterThanOrEqualTo(1L)));
  }