BeanWithEnum loaded = saveAndLoad(bean);
Assert.assertEquals(bean.id, loaded.id);
Assert.assertEquals(bean.enumProperty, loaded.enumProperty);
Query query = new SimpleQuery(new Criteria("enumProperty_s").is(LiteralNumberEnum.TWO));
BeanWithEnum loadedViaProperty = solrTemplate.queryForObject(query, BeanWithEnum.class);
Assert.assertEquals(bean.id, loadedViaProperty.id);
Assert.assertEquals(bean.enumProperty, loadedViaProperty.enumProperty);
}