@Before
 public void before() {
   clean();
   elasticsearchTemplate.createIndex(ParentEntity.class);
   elasticsearchTemplate.createIndex(ChildEntity.class);
   elasticsearchTemplate.putMapping(ParentEntity.class);
   elasticsearchTemplate.putMapping(ChildEntity.class);
 }
 @Test
 public void shouldPutMappingForGivenEntity() throws Exception {
   // given
   Class entity = SampleMappingEntity.class;
   elasticsearchTemplate.createIndex(entity);
   // when
   assertThat(elasticsearchTemplate.putMapping(entity), is(true));
 }