sampleEntity.setId(documentId);
sampleEntity.setMessage("hello world.");
sampleEntity.setVersion(System.currentTimeMillis());
repository.save(sampleEntity);
//when
SearchQuery searchQuery = new NativeSearchQueryBuilder()
.withQuery(fieldQuery("id",documentId))
.build();
Page<IntegerIDEntity> sampleEntities= repository.search(searchQuery);
//then
assertThat(sampleEntities.getTotalElements(), equalTo(1L));