EntityLoaderRegistry { public EntityLoader getLoader(String type) { return entityLoaders.get(type); } @Inject  EntityLoaderRegistry(final Set<EntityLoader> loaders,
                         final EntityTypeRegistry entityTypeRegistry,
                         final JsonTools jsonTools,
                         final IdGenerator idGenerator,
                         final FileUtils fileUtils); EntityLoader getLoader(String type); Collection<EntityLoader> getEntityLoaders();  }
@Test void getLoader() { when(entityTypeRegistry.getEntityTypeMap()).thenReturn(Collections.emptyMap()); EntityLoaderRegistry registry = new EntityLoaderRegistry( Stream.of(new TestEntityLoader()).collect(Collectors.toSet()), entityTypeRegistry, JsonTools.INSTANCE, new IdGenerator(), FileUtils.INSTANCE ); assertNotNull(registry.getEntityLoaders()); assertNotNull(registry.getLoader("ENTITY")); assertNull(registry.getLoader("LOADER")); }