### Question:
ListBinder { public static <T> AnnotatedListBinderBuilder<T> build(Binder binder, Class<T> type) { return build(binder, TypeLiteral.get(type)); } private  ListBinder(
            Binder binder,
            TypeLiteral<T> entryType,
            PotentialAnnotation potentialAnnotation,
            Priority initialPriority); static AnnotatedListBinderBuilder<T> build(Binder binder, Class<T> type); static AnnotatedListBinderBuilder<T> build(Binder binder, TypeLiteral<T> type); LinkedBindingBuilder<T> addBinding(); @Override String toString();  }### Answer:
@Test public void testConflictingDefaultPriorities() { thrown.expect(CreationException.class); thrown.expectMessage(containsString("2 errors")); thrown.expectMessage(containsString("1) Duplicate ListBinder<java.lang.String> with default priority")); thrown.expectMessage(containsString("2) Duplicate ListBinder<java.lang.String> with default priority")); thrown.expectMessage(containsString("at com.tavianator.sangria.listbinder.ListBinderTest")); Guice.createInjector(new AbstractModule() { @Override protected void configure() { ListBinder.build(binder(), String.class) .withDefaultPriority(); } }, new AbstractModule() { @Override protected void configure() { ListBinder.build(binder(), String.class) .withDefaultPriority(); } }); }
@Test public void testConflictingExplicitPriorities() { thrown.expect(CreationException.class); thrown.expectMessage(containsString("2 errors")); thrown.expectMessage(containsString("1) Duplicate ListBinder<java.lang.String> with priority [1]")); thrown.expectMessage(containsString("2) Duplicate ListBinder<java.lang.String> with priority [1]")); thrown.expectMessage(containsString("at com.tavianator.sangria.listbinder.ListBinderTest")); Guice.createInjector(new AbstractModule() { @Override protected void configure() { ListBinder.build(binder(), String.class) .withPriority(1); } }, new AbstractModule() { @Override protected void configure() { ListBinder.build(binder(), String.class) .withPriority(1); } }); }
@Test public void testConflictingDefaultAndExplicitPriorities() { thrown.expect(CreationException.class); thrown.expectMessage(containsString("2 errors")); thrown.expectMessage(containsString(") ListBinder<java.lang.String> with default priority conflicts with ListBinder with explicit priority")); thrown.expectMessage(containsString(") ListBinder<java.lang.String> with priority [1] conflicts with ListBinder with default priority")); thrown.expectMessage(containsString("at com.tavianator.sangria.listbinder.ListBinderTest")); Guice.createInjector(new AbstractModule() { @Override protected void configure() { ListBinder.build(binder(), String.class) .withDefaultPriority(); } }, new AbstractModule() { @Override protected void configure() { ListBinder.build(binder(), String.class) .withPriority(1); } }); }