### Question:
FeatureFlags implements Iterable<FeatureFlag> { @JsonAnySetter public void addFlag(final String name, final boolean enabled) { notNull(name, "name"); featureFlags.add(new FeatureFlag(name, enabled)); }  @JsonAnySetter void addFlag(final String name, final boolean enabled); void removeFlag(final String flagName); @Override Iterator<FeatureFlag> iterator(); boolean isEnabled(final String flagName); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); static final String AGGREGATED_FEATURE_FLAGS_URI; }### Answer:
@Test public void testSerialize() { final FeatureFlags flags = new FeatureFlags(); flags.addFlag("testFeature", true); flags.addFlag("testFeature2", false); assertThat(flags, jsonEquals(resource("featureflag/featureFlags.json"))); }