<commit_before>package wham;

import static org.junit.Assert.assertEquals;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

import org.junit.Before;
import org.junit.Test;

import wham.model.User;
import wham.operation.UserOperation;

public class QueryTest {

    private EntityManager em;

    @Before
    public void setUp() {
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("WHAM");
        this.em = emf.createEntityManager();
    }

//    @Test
//    public void testGetUserByEmail() {
//        UserOperation operation = new UserOperation(em);
//        User u = operation.getUser("<EMAIL>", "password");
//        assertEquals(2, u.getUId());
//    }

}<commit_msg>Fixing QuertTest<commit_after>package wham;

import org.junit.Test;

import junit.framework.TestCase;
import wham.config.AppEntityManager;
import wham.model.User;
import wham.operation.UserOperation;

public class QueryTest extends TestCase {

    @Override
    public void setUp() {
        AppEntityManager.initEntityManagerFactory();
    }

    @Test
    public void testGetUserByEmail() {
        UserOperation operation = new UserOperation();
        User u = operation.getUser("<EMAIL>", "password");
        assertEquals(2, u.getUId());
    }

    @Override
    public void tearDown() {
        AppEntityManager.closeEntityManagerFactory();
    }

}
{'fraction_non_alphanumeric': 0.10956036287508723, 'fraction_numerical': 0.0013956734124214933, 'mean_word_length': 3.5236593059936907, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2994733', 'n_tokens_mistral': 411, 'n_tokens_neox': 407, 'n_words': 90}