assertEquals(1, ce.getErrorMessages().size());
}
}
public void testMapBinderMapPermitDuplicateElements() {
Module ab = new AbstractModule() {
@Override protected void configure() {
MapBinder<String, String> multibinder = MapBinder.newMapBinder(
binder(), String.class, String.class);
multibinder.addBinding("a").toInstance("A");
multibinder.addBinding("b").toInstance("B");
multibinder.permitDuplicates();
}
};
Module bc = new AbstractModule() {
@Override protected void configure() {
MapBinder<String, String> multibinder = MapBinder.newMapBinder(
binder(), String.class, String.class);
multibinder.addBinding("b").toInstance("B");
multibinder.addBinding("c").toInstance("C");