### Question:
Features { public void add(Feature feature) { if (!isAnnotated(feature)) { throw new LionEngineException(ERROR_FEATURE_NOT_ANNOTATED + feature.getClass()); } final Feature old; if ((old = typeToFeature.put(feature.getClass(), feature)) != null) { throw new LionEngineException(ERROR_FEATURE_EXISTS + feature.getClass() + WITH + old.getClass()); } checkTypeDepth(feature, feature.getClass()); features.add(feature); } 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 testFeatureNotAnnotated() { assertThrows(() -> features.add(new FeatureModel(services, setup)), Features.ERROR_FEATURE_NOT_ANNOTATED + FeatureModel.class); }
@Test void testAddExists() { features.add(new FeatureLevel1Model(services, setup)); final String error = Features.ERROR_FEATURE_EXISTS + FeatureLevel1Model.class + Features.WITH + FeatureLevel1Model.class; assertThrows(() -> features.add(new FeatureLevel1Model(services, setup)), error); }
@Test void testAddExistsDepth() { features.add(new RefreshableModel(extrp -> { })); final String error = Features.ERROR_FEATURE_EXISTS + FeatureLevel1Model.class + Features.AS + Refreshable.class + Features.WITH + RefreshableModel.class; assertThrows(() -> features.add(new FeatureLevel1Model(services, setup)), error); }