/**
* With overrides, we should get the union of all map bindings.
*/
public void testModuleOverrideAndMapBindings() {
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");
}
};
Module cd = new AbstractModule() {
@Override protected void configure() {
MapBinder<String, String> multibinder = MapBinder.newMapBinder(binder(), String.class, String.class);
multibinder.addBinding("c").toInstance("C");
multibinder.addBinding("d").toInstance("D");
}
};
Module ef = new AbstractModule() {
@Override protected void configure() {
MapBinder<String, String> multibinder = MapBinder.newMapBinder(binder(), String.class, String.class);
multibinder.addBinding("e").toInstance("E");
multibinder.addBinding("f").toInstance("F");
}