@Autowired
SessionFactory sessionFactory;
@Test
public void testCreateFromPojo() throws Exception {
NestedFeature feature = NestedFeature.getDefaultInstance1();
Object created = layer.create(feature);
sessionFactory.getCurrentSession().flush();
Assert.assertNotNull(created);
Assert.assertTrue(created instanceof NestedFeature);
NestedFeature createdFeature = (NestedFeature) created;
Assert.assertNotNull(createdFeature.getId());
}