SlotFeatureSupport implements FeatureSupport<LinkFeatureTraits> { @Override public boolean accepts(AnnotationFeature aFeature) { switch (aFeature.getMultiValueMode()) { case ARRAY: switch (aFeature.getLinkMode()) { case WITH_ROLE: return true; default: return false; } case NONE: default: return false; } } @Autowired  SlotFeatureSupport(AnnotationSchemaService aAnnotationService); @Override String getId(); @Override void setBeanName(String aBeanName); @Override List<FeatureType> getSupportedFeatureTypes(AnnotationLayer aAnnotationLayer); @Override boolean accepts(AnnotationFeature aFeature); @Override Panel createTraitsEditor(String aId,  IModel<AnnotationFeature> aFeatureModel); @Override FeatureEditor createEditor(String aId, MarkupContainer aOwner,
            AnnotationActionHandler aHandler, final IModel<AnnotatorState> aStateModel,
            final IModel<FeatureState> aFeatureStateModel); @Override void configureFeature(AnnotationFeature aFeature); @Override void generateFeature(TypeSystemDescription aTSD, TypeDescription aTD,
            AnnotationFeature aFeature); @Override List<LinkWithRoleModel> getFeatureValue(AnnotationFeature aFeature, FeatureStructure aFS); @Override void setFeatureValue(CAS aCas, AnnotationFeature aFeature, int aAddress, Object aValue); @Override List<LinkWithRoleModel> unwrapFeatureValue(AnnotationFeature aFeature, CAS aCAS,
            Object aValue); @Override ArrayList<LinkWithRoleModel> wrapFeatureValue(AnnotationFeature aFeature, CAS aCAS,
            Object aValue); @Override LinkFeatureTraits readTraits(AnnotationFeature aFeature); @Override void writeTraits(AnnotationFeature aFeature, LinkFeatureTraits aTraits);  }
@Test public void testAccepts() { AnnotationFeature feat1 = new AnnotationFeature("string", "LinkType"); feat1.setMode(MultiValueMode.ARRAY); feat1.setLinkMode(LinkMode.WITH_ROLE); AnnotationFeature feat2 = new AnnotationFeature("Dummy feature", "someType"); assertThat(sut.accepts(feat1)).isTrue(); assertThat(sut.accepts(feat2)).isFalse(); }