HibernateLayer extends HibernateLayerUtil implements VectorLayer, VectorLayerAssociationSupport,
		VectorLayerLazyFeatureConversionSupport { @Override public Object create(Object feature) throws LayerException { enforceSrid(feature); Session session = getSessionFactory().getCurrentSession(); session.save(feature); return feature; }  @Override String getId(); @Api void setId(String id); @Override CoordinateReferenceSystem getCrs(); @Override FeatureModel getFeatureModel(); @Override boolean useLazyFeatureConversion(); @Api void setUseLazyFeatureConversion(boolean useLazyFeatureConversion); @Api @Override void setLayerInfo(VectorLayerInfo layerInfo); @Override boolean isCreateCapable(); @Override boolean isUpdateCapable(); @Override boolean isDeleteCapable(); @Api void setFeatureModel(FeatureModel featureModel); @Api void setSessionFactory(SessionFactory sessionFactory); Iterator<?> getElements(Filter filter, int offset, int maxResultSize); @Override Object create(Object feature); @Override Object saveOrUpdate(Object feature); @Override void delete(String featureId); @Override Object read(String featureId); void update(Object feature); @Override Envelope getBounds(); Envelope getBounds(Filter filter); @Override List<Attribute<?>> getAttributes(String attributeName, Filter filter); DateFormat getDateFormat(); void setDateFormat(DateFormat dateFormat); boolean isScrollableResultSet(); @Api void setScrollableResultSet(boolean scrollableResultSet);  }
@Test public void testCreate() throws Exception { HibernateTestFeature feature = HibernateTestFeature.getDefaultInstance1(null); Object created = layer.create(feature); Assert.assertNotNull(created); Assert.assertTrue(created instanceof HibernateTestFeature); HibernateTestFeature createdFeature = (HibernateTestFeature) created; Assert.assertNotNull(createdFeature.getId()); }