<commit_before>package ru.spoddubnyak;

import org.junit.Test;
import ru.spoddubnyak.model.User;

import java.util.Calendar;
import java.util.GregorianCalendar;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;

/**
 * Tests class User.
 *
 * @author <NAME> (<EMAIL>)
 * @version 1.0
 * @since 25.08.2017
 */
public class UserTest {
    /**
     * Test method create object User and get expected field.
     */
    @Test
    public void whenCreateConstructorObjectGetExpectedFieldObject() {
        final String name = "testName";
        final int children = 9;
        final Calendar birthday = new GregorianCalendar(1990, 12, 21);
        User user = new User(name, children, birthday);
        assertThat(user.getName(), is(name));
        assertThat(user.getChildren(), is(children));
        assertThat(user.getBirthday(), is(birthday));
    }
}
<commit_msg>2. Не перекрывать equals hashCode [#1005]<commit_after>package ru.spoddubnyak;

import org.junit.Test;
import ru.spoddubnyak.model.User;

import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.Map;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;

/**
 * Tests class User.
 *
 * @author <NAME> (<EMAIL>)
 * @version 1.0
 * @since 25.08.2017
 */
public class UserTest {
    /**
     * property name - name user.
     */
    private final String name = "testName";
    /**
     * property children - number children.
     */
    private final int children = 9;
    /**
     * property birthday - birthday user.
     */
    private final Calendar birthday = new GregorianCalendar(1990, 12, 21);

    /**
     * Test method create object User and get expected field.
     */
    @Test
    public void whenCreateConstructorObjectGetExpectedFieldObject() {

        User user = new User(name, children, birthday);
        assertThat(user.getName(), is(name));
        assertThat(user.getChildren(), is(children));
        assertThat(user.getBirthday(), is(birthday));
    }

    /**
     * Test do not override methods equals() and hashCode().
     */
    @Test
    public void whenAddMappElementsNotEqualsAndFashCodeGetExpectedResult() {
        User userOne = new User(name, children, birthday);
        User userTwo = new User(name, children, birthday);
        assertThat(userOne.equals(userTwo), is(false));
        assertThat(userOne.hashCode() == userTwo.hashCode(), is(false));
        Map<User, Object> map = new HashMap<>();
        map.put(userOne, "One");
        map.put(userTwo, "One");
        System.out.println(map);
    }
}

{'fraction_non_alphanumeric': 0.12547384382107657, 'fraction_numerical': 0.016300227445034118, 'mean_word_length': 3.053763440860215, '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': '4362924', 'n_tokens_mistral': 823, 'n_tokens_neox': 785, 'n_words': 201}