@Test public void testEnabledBrokerFeatures() { Features feat = new Features(); assertThat(feat.enabledBrokerFeatures()).containsExactly( Feature.BROKER_SUBSCRIBER_BLACKWHITE_LISTING, Feature.BROKER_PUBLISHER_EXCLUSION, Feature.BROKER_PUBLISHER_IDENTIFICATION, Feature.BROKER_PATTERN_BASED_SUBSCRIPTION, Feature.BROKER_EVENT_RETENTION); feat.disable(Feature.BROKER_SUBSCRIBER_BLACKWHITE_LISTING); assertThat(feat.enabledBrokerFeatures()).containsExactly( Feature.BROKER_PUBLISHER_EXCLUSION, Feature.BROKER_PUBLISHER_IDENTIFICATION, Feature.BROKER_PATTERN_BASED_SUBSCRIPTION, Feature.BROKER_EVENT_RETENTION); feat.disable(Feature.BROKER_PUBLISHER_EXCLUSION); assertThat(feat.enabledBrokerFeatures()).containsExactly( Feature.BROKER_PUBLISHER_IDENTIFICATION, Feature.BROKER_PATTERN_BASED_SUBSCRIPTION, Feature.BROKER_EVENT_RETENTION); feat.disable(Feature.BROKER_PUBLISHER_IDENTIFICATION); assertThat(feat.enabledBrokerFeatures()).containsExactly( Feature.BROKER_PATTERN_BASED_SUBSCRIPTION, Feature.BROKER_EVENT_RETENTION); feat.disable(Feature.BROKER_PATTERN_BASED_SUBSCRIPTION); assertThat(feat.enabledBrokerFeatures()) .containsExactly(Feature.BROKER_EVENT_RETENTION); feat.disable(Feature.BROKER_EVENT_RETENTION); assertThat(feat.enabledBrokerFeatures()).isEmpty(); }
public List<Feature> enabledBrokerFeatures() { List<Feature> brokerFeatures = new ArrayList<>(); if (isEnabled(Feature.BROKER_SUBSCRIBER_BLACKWHITE_LISTING)) { brokerFeatures.add(Feature.BROKER_SUBSCRIBER_BLACKWHITE_LISTING); } if (isEnabled(Feature.BROKER_PUBLISHER_EXCLUSION)) { brokerFeatures.add(Feature.BROKER_PUBLISHER_EXCLUSION); } if (isEnabled(Feature.BROKER_PUBLISHER_IDENTIFICATION)) { brokerFeatures.add(Feature.BROKER_PUBLISHER_IDENTIFICATION); } if (isEnabled(Feature.BROKER_PATTERN_BASED_SUBSCRIPTION)) { brokerFeatures.add(Feature.BROKER_PATTERN_BASED_SUBSCRIPTION); } if (isEnabled(Feature.BROKER_EVENT_RETENTION)) { brokerFeatures.add(Feature.BROKER_EVENT_RETENTION); } return brokerFeatures; }
Features { public List<Feature> enabledBrokerFeatures() { List<Feature> brokerFeatures = new ArrayList<>(); if (isEnabled(Feature.BROKER_SUBSCRIBER_BLACKWHITE_LISTING)) { brokerFeatures.add(Feature.BROKER_SUBSCRIBER_BLACKWHITE_LISTING); } if (isEnabled(Feature.BROKER_PUBLISHER_EXCLUSION)) { brokerFeatures.add(Feature.BROKER_PUBLISHER_EXCLUSION); } if (isEnabled(Feature.BROKER_PUBLISHER_IDENTIFICATION)) { brokerFeatures.add(Feature.BROKER_PUBLISHER_IDENTIFICATION); } if (isEnabled(Feature.BROKER_PATTERN_BASED_SUBSCRIPTION)) { brokerFeatures.add(Feature.BROKER_PATTERN_BASED_SUBSCRIPTION); } if (isEnabled(Feature.BROKER_EVENT_RETENTION)) { brokerFeatures.add(Feature.BROKER_EVENT_RETENTION); } return brokerFeatures; } }
Features { public List<Feature> enabledBrokerFeatures() { List<Feature> brokerFeatures = new ArrayList<>(); if (isEnabled(Feature.BROKER_SUBSCRIBER_BLACKWHITE_LISTING)) { brokerFeatures.add(Feature.BROKER_SUBSCRIBER_BLACKWHITE_LISTING); } if (isEnabled(Feature.BROKER_PUBLISHER_EXCLUSION)) { brokerFeatures.add(Feature.BROKER_PUBLISHER_EXCLUSION); } if (isEnabled(Feature.BROKER_PUBLISHER_IDENTIFICATION)) { brokerFeatures.add(Feature.BROKER_PUBLISHER_IDENTIFICATION); } if (isEnabled(Feature.BROKER_PATTERN_BASED_SUBSCRIPTION)) { brokerFeatures.add(Feature.BROKER_PATTERN_BASED_SUBSCRIPTION); } if (isEnabled(Feature.BROKER_EVENT_RETENTION)) { brokerFeatures.add(Feature.BROKER_EVENT_RETENTION); } return brokerFeatures; }  }
Features { public List<Feature> enabledBrokerFeatures() { List<Feature> brokerFeatures = new ArrayList<>(); if (isEnabled(Feature.BROKER_SUBSCRIBER_BLACKWHITE_LISTING)) { brokerFeatures.add(Feature.BROKER_SUBSCRIBER_BLACKWHITE_LISTING); } if (isEnabled(Feature.BROKER_PUBLISHER_EXCLUSION)) { brokerFeatures.add(Feature.BROKER_PUBLISHER_EXCLUSION); } if (isEnabled(Feature.BROKER_PUBLISHER_IDENTIFICATION)) { brokerFeatures.add(Feature.BROKER_PUBLISHER_IDENTIFICATION); } if (isEnabled(Feature.BROKER_PATTERN_BASED_SUBSCRIPTION)) { brokerFeatures.add(Feature.BROKER_PATTERN_BASED_SUBSCRIPTION); } if (isEnabled(Feature.BROKER_EVENT_RETENTION)) { brokerFeatures.add(Feature.BROKER_EVENT_RETENTION); } return brokerFeatures; }  void disable(Feature feature); boolean isEnabled(Feature feature); boolean isDisabled(Feature feature); List<Feature> enabledDealerFeatures(); List<Feature> enabledBrokerFeatures(); }
Features { public List<Feature> enabledBrokerFeatures() { List<Feature> brokerFeatures = new ArrayList<>(); if (isEnabled(Feature.BROKER_SUBSCRIBER_BLACKWHITE_LISTING)) { brokerFeatures.add(Feature.BROKER_SUBSCRIBER_BLACKWHITE_LISTING); } if (isEnabled(Feature.BROKER_PUBLISHER_EXCLUSION)) { brokerFeatures.add(Feature.BROKER_PUBLISHER_EXCLUSION); } if (isEnabled(Feature.BROKER_PUBLISHER_IDENTIFICATION)) { brokerFeatures.add(Feature.BROKER_PUBLISHER_IDENTIFICATION); } if (isEnabled(Feature.BROKER_PATTERN_BASED_SUBSCRIPTION)) { brokerFeatures.add(Feature.BROKER_PATTERN_BASED_SUBSCRIPTION); } if (isEnabled(Feature.BROKER_EVENT_RETENTION)) { brokerFeatures.add(Feature.BROKER_EVENT_RETENTION); } return brokerFeatures; }  void disable(Feature feature); boolean isEnabled(Feature feature); boolean isDisabled(Feature feature); List<Feature> enabledDealerFeatures(); List<Feature> enabledBrokerFeatures();  }