### Question:
Features { public Features() { super(); } Features(); void add(Feature feature); C get(Class<C> feature); boolean contains(Class<C> feature); Iterable<Feature> getFeatures(); Iterable<Class<? extends Feature>> getFeaturesType();  }### Answer:
@Test void testFeatures() { assertFalse(features.contains(Feature.class)); final Identifiable identifiable = new IdentifiableModel(); features.add(identifiable); assertEquals(identifiable, features.get(Identifiable.class)); assertEquals(identifiable, features.get(IdentifiableModel.class)); int i = 0; for (final Feature current : features.getFeatures()) { assertEquals(identifiable, current); i++; } assertEquals(1, i); i = 0; for (final Class<? extends Feature> type : features.getFeaturesType()) { assertTrue(Feature.class.isAssignableFrom(type)); i++; } assertEquals(2, i); }