<commit_before>package com.epam.rft.atsy.persistence.repositories;

import com.epam.rft.atsy.persistence.entities.PasswordHistoryEntity;
import com.epam.rft.atsy.persistence.entities.UserEntity;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.jdbc.Sql;

import java.time.ZonedDateTime;
import java.util.Date;
import java.util.List;

import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.assertThat;

@Sql("classpath:sql/passwordhistory/passwordhistory.sql")
public class PasswordHistoryRepositoryIT extends AbstractRepositoryIT {

    private static final String TEST_USERNAME_WITHOUT_PASSWORD_HISTORY = "Test2";
    private static final String TEST_USERNAME_WITH_SINGLE_PASSWORD_HISTORY = "Test";
    private static final String TEST_USERNAME_WITH_THREE_PASSWORD_HISTORY = "Dev";
    private static final String TEST_PASSWORD_1_FOR_USER_WITH_THREE_PASSWORD_HISTORY = "<PASSWORD>";
    private static final String TEST_PASSWORD_2_FOR_USER_WITH_THREE_PASSWORD_HISTORY = "<PASSWORD>";

    private static final long TEST_USER_ID_WITHOUT_PASSWORD_HISTORY = 3L;
    private static final long TEST_USER_ID_WITH_THREE_PASSWORD_HISTORY = 2L;
    private static final String ACTUAL_PASSWORD_FOR_USER_WITH_THREE_PASSWORD_HISTORY = <PASSWORD>";

    @Autowired
    private PasswordHistoryRepository repository;<commit_msg>Removed unused import<commit_after>package com.epam.rft.atsy.persistence.repositories;

import com.epam.rft.atsy.persistence.entities.PasswordHistoryEntity;
import com.epam.rft.atsy.persistence.entities.UserEntity;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.jdbc.Sql;

import java.time.ZonedDateTime;
import java.util.Date;
import java.util.List;

import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.assertThat;

@Sql("classpath:sql/passwordhistory/passwordhistory.sql")
public class PasswordHistoryRepositoryIT extends AbstractRepositoryIT {

    private static final String TEST_USERNAME_WITHOUT_PASSWORD_HISTORY = "Test2";
    private static final String TEST_USERNAME_WITH_SINGLE_PASSWORD_HISTORY = "Test";
    private static final String TEST_USERNAME_WITH_THREE_PASSWORD_HISTORY = "Dev";
    private static final String TEST_PASSWORD_1_FOR_USER_WITH_THREE_PASSWORD_HISTORY = "<PASSWORD>";
    private static final String TEST_PASSWORD_2_FOR_USER_WITH_THREE_PASSWORD_HISTORY = "<PASSWORD>";

    private static final long TEST_USER_ID_WITHOUT_PASSWORD_HISTORY = 3L;
    private static final long TEST_USER_ID_WITH_THREE_PASSWORD_HISTORY = 2L;
    private static final String ACTUAL_PASSWORD_FOR_USER_WITH_THREE_PASSWORD_HISTORY = <PASSWORD>";

    @Autowired
    private PasswordHistoryRepository repository;
{'fraction_non_alphanumeric': 0.07224848075624578, 'fraction_numerical': 0.004051316677920324, 'mean_word_length': 6.7565445026178015, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2410592', 'n_tokens_mistral': 925, 'n_tokens_neox': 920, 'n_words': 173}