<commit_before>package me.prettyprint.hom;

import static org.junit.Assert.*;

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

import me.prettyprint.cassandra.service.CassandraHostConfigurator;

import org.junit.Test;

public class EntityManagerFactoryTest extends CassandraTestBase {
  
  private EntityManagerFactory entityManagerFactory;
  
  @Test
  public void testCreateEntityManager() {
    entityManagerFactory = new EntityManagerFactoryImpl("TestPool", "TestKeyspace", 
        "me.prettyprint.hom.beans", new CassandraHostConfigurator("localhost:9161"));
    EntityManager entityManager = entityManagerFactory.createEntityManager();
    assertNotNull(entityManager);
    assertTrue(entityManagerFactory.isOpen());    
  }

}<commit_msg>added test for shutdown of factory<commit_after>package me.prettyprint.hom;

import static org.junit.Assert.*;

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

import me.prettyprint.cassandra.service.CassandraHostConfigurator;

import org.junit.Test;

public class EntityManagerFactoryTest extends CassandraTestBase {
  
  private EntityManagerFactory entityManagerFactory;
  
  @Test
  public void testCreateEntityManager() {
    entityManagerFactory = new EntityManagerFactoryImpl("TestPool", "TestKeyspace", 
        "me.prettyprint.hom.beans", new CassandraHostConfigurator("localhost:9161"));
    EntityManager entityManager = entityManagerFactory.createEntityManager();
    assertNotNull(entityManager);
    assertTrue(entityManagerFactory.isOpen());    
  }

  @Test
  public void testCloseEntityManagerFactory() {
    entityManagerFactory = new EntityManagerFactoryImpl("TestPool", "TestKeyspace", 
        "me.prettyprint.hom.beans", new CassandraHostConfigurator("localhost:9161"));
    assertTrue(entityManagerFactory.isOpen());
    entityManagerFactory.close();
    assertFalse(entityManagerFactory.isOpen());
  }
}
{'fraction_non_alphanumeric': 0.09114183307731695, 'fraction_numerical': 0.006144393241167435, 'mean_word_length': 5.929078014184397, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2018063', 'n_tokens_mistral': 527, 'n_tokens_neox': 512, 'n_words': 93}