<commit_before>package org.marsik.elshelves.backend.test.config;

import net.spy.memcached.MemcachedClient;
import org.marsik.elshelves.backend.app.mvc.RenamingProcessor;
import org.marsik.elshelves.backend.app.spring.ApplicationRest;
import org.marsik.elshelves.backend.app.spring.NoAutoscan;
import org.marsik.elshelves.backend.controllers.UserController;
import org.marsik.elshelves.backend.entities.converters.AbstractEmberToEntity;
import org.marsik.elshelves.backend.repositories.ItemRepository;
import org.marsik.elshelves.backend.repositories.LotHistoryRepository;
import org.marsik.elshelves.backend.repositories.LotRepository;
import org.marsik.elshelves.backend.repositories.NamedEntityRepository;
import org.marsik.elshelves.backend.repositories.OwnedEntityRepository;
import org.marsik.elshelves.backend.repositories.TestRepository;
import org.marsik.elshelves.backend.security.CurrentUserArgumentResolver;
import org.marsik.elshelves.backend.security.CurrentUserArgumentResolverImpl;
import org.marsik.elshelves.backend.services.AuthorizationService;
import org.marsik.elshelves.backend.services.BackupService;
import org.marsik.elshelves.backend.services.BoxService;
import org.marsik.elshelves.backend.services.CodeService;
import org.marsik.elshelves.backend.services.DocumentService;
import org.marsik.elshelves.backend.services.ElshelvesUserDetailsService;
import org.marsik.elshelves.backend.services.FileAnalysisDoneHandler;
import org.marsik.elshelves.backend.services.FootprintService;
import org.marsik.elshelves.backend.services.GithubOauthService;
import org.marsik.elshelves.backend.services.GoogleOauthService;
import org.marsik.elshelves.backend.services.GroupService;
import org.marsik.elshelves.backend.services.IdentifiedEntityService;
import org.marsik.elshelves.backend.services.IdentifiedEntityServiceInterface;
import org.marsik.elshelves.backend.services.ItemService;
import org.marsik.elshelves.backend.services.ListService;
import org.marsik.elshelves.backend.services.LotService;
import org.marsik.elshelves.backend.services.MailService;
import org.marsik.elshelves.backend.services.NumericPropertyService;
import org.marsik.elshelves.backend.services.PurchaseService;
import org.marsik.elshelves.backend.services.RequirementService;
import org.marsik.elshelves.backend.services.SearchService;
import org.marsik.elshelves.backend.services.SourceService;
import org.marsik.elshelves.backend.services.StickerService;
import org.marsik.elshelves.backend.services.StorageManager;
import org.marsik.elshelves.backend.services.TransactionService;
import org.marsik.elshelves.backend.services.TypeService;
import org.marsik.elshelves.backend.services.UnitService;
import org.marsik.elshelves.backend.services.UserService;
import org.marsik.elshelves.backend.services.UuidGenerator;
import org.marsik.elshelves.backend.services.UuidGeneratorImpl;
import org.marsik.elshelves.backend.test.util.MockitoFactoryBean;
import org.omg.CORBA.Current;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.embedded.EmbeddedServletContainerFactory;
import org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory;
import org.springframework.boot.test.WebIntegrationTest;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
@NoAutoscan
@EnableAutoConfiguration
@EnableTransactionManagement
public class ControllerOnlyApplication {
    @Bean
    EmbeddedServletContainerFactory getJetty() {
        return new JettyEmbeddedServletContainerFactory();
    }

    @Bean
    public MockitoFactoryBean<AuthorizationService> authorizationServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(AuthorizationService.class);
    }

    @Bean
    public MockitoFactoryBean<BackupService> backupServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(BackupService.class);
    }

    @Bean
    public MockitoFactoryBean<BoxService> boxServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(BoxService.class);
    }

    @Bean
    public MockitoFactoryBean<CodeService> codeServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(CodeService.class);
    }

    @Bean
    public MockitoFactoryBean<DocumentService> documentServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(DocumentService.class);
    }

    @Bean
    public MockitoFactoryBean<ElshelvesUserDetailsService> elshelvesUserDetailsServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(ElshelvesUserDetailsService.class);
    }

    @Bean
    public MockitoFactoryBean<FileAnalysisDoneHandler> fileAnalysisDoneHandlerMockitoFactoryBean() {
        return new MockitoFactoryBean<>(FileAnalysisDoneHandler.class);
    }

    @Bean
    public MockitoFactoryBean<FootprintService> footprintServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(FootprintService.class);
    }

    @Bean
    public MockitoFactoryBean<GroupService> groupServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(GroupService.class);
    }

    @Bean
    public MockitoFactoryBean<ItemRepository> itemRepositoryMockitoFactoryBean() {
        return new MockitoFactoryBean<>(ItemRepository.class);
    }

    @Bean
    public MockitoFactoryBean<ItemService> itemServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(ItemService.class);
    }

    @Bean
    public MockitoFactoryBean<ListService> listServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(ListService.class);
    }

    @Bean
    public MockitoFactoryBean<LotHistoryRepository> lotHistoryRepositoryMockitoFactoryBean() {
        return new MockitoFactoryBean<>(LotHistoryRepository.class);
    }

    @Bean
    public MockitoFactoryBean<LotRepository> lotRepositoryMockitoFactoryBean() {
        return new MockitoFactoryBean<>(LotRepository.class);
    }

    @Bean
    public MockitoFactoryBean<LotService> lotServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(LotService.class);
    }

    @Bean
    public MockitoFactoryBean<MailService> mailgunServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(MailService.class);
    }

    @Bean
    public MockitoFactoryBean<NamedEntityRepository> namedEntityRepositoryMockitoFactoryBean() {
        return new MockitoFactoryBean<>(NamedEntityRepository.class);
    }

    @Bean
    public MockitoFactoryBean<NumericPropertyService> numericPropertyServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(NumericPropertyService.class);
    }

    @Bean
    public MockitoFactoryBean<OwnedEntityRepository> ownedEntityRepositoryMockitoFactoryBean() {
        return new MockitoFactoryBean<>(OwnedEntityRepository.class);
    }

    @Bean
    public MockitoFactoryBean<PurchaseService> purchaseServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(PurchaseService.class);
    }

    @Bean
    public MockitoFactoryBean<RequirementService> requirementServiceMockitoFactoryBean() {<commit_msg>Fix a missing mock in controller tests<commit_after>package org.marsik.elshelves.backend.test.config;

import net.spy.memcached.MemcachedClient;
import org.marsik.elshelves.backend.app.mvc.RenamingProcessor;
import org.marsik.elshelves.backend.app.spring.ApplicationRest;
import org.marsik.elshelves.backend.app.spring.NoAutoscan;
import org.marsik.elshelves.backend.controllers.UserController;
import org.marsik.elshelves.backend.entities.converters.AbstractEmberToEntity;
import org.marsik.elshelves.backend.repositories.ItemRepository;
import org.marsik.elshelves.backend.repositories.LotHistoryRepository;
import org.marsik.elshelves.backend.repositories.LotRepository;
import org.marsik.elshelves.backend.repositories.NamedEntityRepository;
import org.marsik.elshelves.backend.repositories.OwnedEntityRepository;
import org.marsik.elshelves.backend.repositories.TestRepository;
import org.marsik.elshelves.backend.repositories.UserRepository;
import org.marsik.elshelves.backend.security.CurrentUserArgumentResolver;
import org.marsik.elshelves.backend.security.CurrentUserArgumentResolverImpl;
import org.marsik.elshelves.backend.services.AuthorizationService;
import org.marsik.elshelves.backend.services.BackupService;
import org.marsik.elshelves.backend.services.BoxService;
import org.marsik.elshelves.backend.services.CodeService;
import org.marsik.elshelves.backend.services.DocumentService;
import org.marsik.elshelves.backend.services.ElshelvesUserDetailsService;
import org.marsik.elshelves.backend.services.FileAnalysisDoneHandler;
import org.marsik.elshelves.backend.services.FootprintService;
import org.marsik.elshelves.backend.services.GithubOauthService;
import org.marsik.elshelves.backend.services.GoogleOauthService;
import org.marsik.elshelves.backend.services.GroupService;
import org.marsik.elshelves.backend.services.IdentifiedEntityService;
import org.marsik.elshelves.backend.services.IdentifiedEntityServiceInterface;
import org.marsik.elshelves.backend.services.ItemService;
import org.marsik.elshelves.backend.services.ListService;
import org.marsik.elshelves.backend.services.LotService;
import org.marsik.elshelves.backend.services.MailService;
import org.marsik.elshelves.backend.services.NumericPropertyService;
import org.marsik.elshelves.backend.services.PurchaseService;
import org.marsik.elshelves.backend.services.RequirementService;
import org.marsik.elshelves.backend.services.SearchService;
import org.marsik.elshelves.backend.services.SourceService;
import org.marsik.elshelves.backend.services.StickerService;
import org.marsik.elshelves.backend.services.StorageManager;
import org.marsik.elshelves.backend.services.TransactionService;
import org.marsik.elshelves.backend.services.TypeService;
import org.marsik.elshelves.backend.services.UnitService;
import org.marsik.elshelves.backend.services.UserService;
import org.marsik.elshelves.backend.services.UuidGenerator;
import org.marsik.elshelves.backend.services.UuidGeneratorImpl;
import org.marsik.elshelves.backend.test.util.MockitoFactoryBean;
import org.omg.CORBA.Current;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.embedded.EmbeddedServletContainerFactory;
import org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory;
import org.springframework.boot.test.WebIntegrationTest;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
@NoAutoscan
@EnableAutoConfiguration
@EnableTransactionManagement
public class ControllerOnlyApplication {
    @Bean
    EmbeddedServletContainerFactory getJetty() {
        return new JettyEmbeddedServletContainerFactory();
    }

    @Bean
    public MockitoFactoryBean<AuthorizationService> authorizationServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(AuthorizationService.class);
    }

    @Bean
    public MockitoFactoryBean<BackupService> backupServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(BackupService.class);
    }

    @Bean
    public MockitoFactoryBean<BoxService> boxServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(BoxService.class);
    }

    @Bean
    public MockitoFactoryBean<CodeService> codeServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(CodeService.class);
    }

    @Bean
    public MockitoFactoryBean<DocumentService> documentServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(DocumentService.class);
    }

    @Bean
    public MockitoFactoryBean<ElshelvesUserDetailsService> elshelvesUserDetailsServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(ElshelvesUserDetailsService.class);
    }

    @Bean
    public MockitoFactoryBean<FileAnalysisDoneHandler> fileAnalysisDoneHandlerMockitoFactoryBean() {
        return new MockitoFactoryBean<>(FileAnalysisDoneHandler.class);
    }

    @Bean
    public MockitoFactoryBean<FootprintService> footprintServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(FootprintService.class);
    }

    @Bean
    public MockitoFactoryBean<GroupService> groupServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(GroupService.class);
    }

    @Bean
    public MockitoFactoryBean<ItemRepository> itemRepositoryMockitoFactoryBean() {
        return new MockitoFactoryBean<>(ItemRepository.class);
    }

    @Bean
    public MockitoFactoryBean<ItemService> itemServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(ItemService.class);
    }

    @Bean
    public MockitoFactoryBean<ListService> listServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(ListService.class);
    }

    @Bean
    public MockitoFactoryBean<LotHistoryRepository> lotHistoryRepositoryMockitoFactoryBean() {
        return new MockitoFactoryBean<>(LotHistoryRepository.class);
    }

    @Bean
    public MockitoFactoryBean<LotRepository> lotRepositoryMockitoFactoryBean() {
        return new MockitoFactoryBean<>(LotRepository.class);
    }

    @Bean
    public MockitoFactoryBean<UserRepository> userRepositoryMockitoFactoryBean() {
        return new MockitoFactoryBean<>(UserRepository.class);
    }

    @Bean
    public MockitoFactoryBean<LotService> lotServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(LotService.class);
    }

    @Bean
    public MockitoFactoryBean<MailService> mailgunServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(MailService.class);
    }

    @Bean
    public MockitoFactoryBean<NamedEntityRepository> namedEntityRepositoryMockitoFactoryBean() {
        return new MockitoFactoryBean<>(NamedEntityRepository.class);
    }

    @Bean
    public MockitoFactoryBean<NumericPropertyService> numericPropertyServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(NumericPropertyService.class);
    }

    @Bean
    public MockitoFactoryBean<OwnedEntityRepository> ownedEntityRepositoryMockitoFactoryBean() {
        return new MockitoFactoryBean<>(OwnedEntityRepository.class);
    }

    @Bean
    public MockitoFactoryBean<PurchaseService> purchaseServiceMockitoFactoryBean() {
        return new MockitoFactoryBean<>(PurchaseService.class);
    }

    @Bean
    public MockitoFactoryBean<RequirementService> requirementServiceMockitoFactoryBean() {
{'fraction_non_alphanumeric': 0.08318023439974659, 'fraction_numerical': 0.00012670256572695597, 'mean_word_length': 6.044176706827309, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 87, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6821780', 'n_tokens_mistral': 4393, 'n_tokens_neox': 4369, 'n_words': 577}