// Path: src/test/java/com/github/virustotalop/obsidianauctions/test/util/mock/MockInjectorModule.java
// public class MockInjectorModule implements Module {
//     @Override
//     public void configure(Binder binder) {
//         binder.bind(MockListenerOne.class).toInstance(new MockListenerOne());
//         binder.bind(MockListenerTwo.class).toInstance(new MockListenerTwo());
//     }
// }
// 
// Path: src/test/java/com/github/virustotalop/obsidianauctions/test/util/mock/MockListener.java
// public interface MockListener {
// 
// 
// }
// 
// Path: src/test/java/com/github/virustotalop/obsidianauctions/test/util/mock/listener/MockListenerOne.java
// public class MockListenerOne implements MockListener {
// }
// 
// Path: src/test/java/com/github/virustotalop/obsidianauctions/test/util/mock/listener/MockListenerTwo.java
// public class MockListenerTwo implements MockListener {
// }
// 
// Path: src/main/java/com/gmail/virustotalop/obsidianauctions/util/InjectUtil.java
// @ApiStatus.Internal
// @ApiStatus.NonExtendable
// public final class InjectUtil {
// 
//     public static <T> List<T> collect(@NotNull Class<T> superClazz, @NotNull Injector injector) {
//         List<T> bindings = new ArrayList<>();
//         injector.getAllBindings().values().forEach(binding -> {
//             Class<?> bindingClazz = binding.getKey().getTypeLiteral().getRawType();
//             if (superClazz.isAssignableFrom(bindingClazz)) {
//                 bindings.add((T) binding.getProvider().get());
//             }
//         });
//         return bindings;
//     }
// 
//     private InjectUtil() {
//     }
// }


import com.github.virustotalop.obsidianauctions.test.util.mock.MockInjectorModule;
import com.github.virustotalop.obsidianauctions.test.util.mock.MockListener;
import com.github.virustotalop.obsidianauctions.test.util.mock.listener.MockListenerOne;
import com.github.virustotalop.obsidianauctions.test.util.mock.listener.MockListenerTwo;
import com.gmail.virustotalop.obsidianauctions.util.InjectUtil;
import com.google.inject.Guice;
import com.google.inject.Injector;
import org.junit.jupiter.api.Test;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals;
package com.github.virustotalop.obsidianauctions.test.util;




public class InjectUtilTest {

    @Test
    public void testCollect() {
        Injector injector = Guice.createInjector(new MockInjectorModule());
        List<MockListener> collected = InjectUtil.collect(MockListener.class, injector);
// Path: src/test/java/com/github/virustotalop/obsidianauctions/test/util/mock/MockInjectorModule.java
// public class MockInjectorModule implements Module {
//     @Override
//     public void configure(Binder binder) {
//         binder.bind(MockListenerOne.class).toInstance(new MockListenerOne());
//         binder.bind(MockListenerTwo.class).toInstance(new MockListenerTwo());
//     }
// }
// 
// Path: src/test/java/com/github/virustotalop/obsidianauctions/test/util/mock/MockListener.java
// public interface MockListener {
// 
// 
// }
// 
// Path: src/test/java/com/github/virustotalop/obsidianauctions/test/util/mock/listener/MockListenerOne.java
// public class MockListenerOne implements MockListener {
// }
// 
// Path: src/test/java/com/github/virustotalop/obsidianauctions/test/util/mock/listener/MockListenerTwo.java
// public class MockListenerTwo implements MockListener {
// }
// 
// Path: src/main/java/com/gmail/virustotalop/obsidianauctions/util/InjectUtil.java
// @ApiStatus.Internal
// @ApiStatus.NonExtendable
// public final class InjectUtil {
// 
//     public static <T> List<T> collect(@NotNull Class<T> superClazz, @NotNull Injector injector) {
//         List<T> bindings = new ArrayList<>();
//         injector.getAllBindings().values().forEach(binding -> {
//             Class<?> bindingClazz = binding.getKey().getTypeLiteral().getRawType();
//             if (superClazz.isAssignableFrom(bindingClazz)) {
//                 bindings.add((T) binding.getProvider().get());
//             }
//         });
//         return bindings;
//     }
// 
//     private InjectUtil() {
//     }
// }


// Path: src/test/java/com/github/virustotalop/obsidianauctions/test/util/InjectUtilTest.java
import com.github.virustotalop.obsidianauctions.test.util.mock.MockInjectorModule;
import com.github.virustotalop.obsidianauctions.test.util.mock.MockListener;
import com.github.virustotalop.obsidianauctions.test.util.mock.listener.MockListenerOne;
import com.github.virustotalop.obsidianauctions.test.util.mock.listener.MockListenerTwo;
import com.gmail.virustotalop.obsidianauctions.util.InjectUtil;
import com.google.inject.Guice;
import com.google.inject.Injector;
import org.junit.jupiter.api.Test;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals;

package com.github.virustotalop.obsidianauctions.test.util;




public class InjectUtilTest {

    @Test
    public void testCollect() {
        Injector injector = Guice.createInjector(new MockInjectorModule());
        List<MockListener> collected = InjectUtil.collect(MockListener.class, injector);
        assertEquals(2, collected.size());