@Test
public void testSerialization() throws ClassNotFoundException, IOException {

  final SimpleFeatureType ftype =
      AnalyticFeature.createGeometryFeatureAdapter(
          "centroid",
          new String[] {"extra1"},
          BasicFeatureTypes.DEFAULT_NAMESPACE,
          ClusteringUtils.CLUSTERING_CRS).getFeatureType();
  final Index index = new SpatialDimensionalityTypeProvider().createIndex(new SpatialOptions());
  final FeatureDataAdapter adapter = new FeatureDataAdapter(ftype);
  adapter.init(index);
  final SerializableAdapterStore store =
      new SerializableAdapterStore(new MemoryAdapterStore(new DataTypeAdapter<?>[] {adapter}));
  final String id = "centroid";
  assertNotNull(checkSerialization(store).getAdapter(id));
}