<commit_before>package org.opencb.datastore.mongodb;

import com.mongodb.DB;
import com.mongodb.MongoClient;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;

/**
 * Created by imedina on 25/03/14.
 * 
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 */
public class MongoDBConfigurationTest {

    @Test
    public void testInit() throws Exception {
        MongoDBConfiguration mongoDBConfiguration = MongoDBConfiguration.builder().init()
                .add("writeConcern", "ACK")
                .build();
        System.out.println(mongoDBConfiguration.toJson());

        MongoClient client = new MongoClient("localhost");
        DB db = client.getDB("test");

        MongoDataStore mongoDataStore = new MongoDataStore(client, db, mongoDBConfiguration);
        
        assertNotNull(mongoDataStore);
        assertEquals(db, mongoDataStore.getDb());
    }
}<commit_msg>Connection closed after MongoDBConfigurationTest<commit_after>package org.opencb.datastore.mongodb;

import com.mongodb.DB;
import com.mongodb.MongoClient;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;

/**
 * Created by imedina on 25/03/14.
 * 
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 */
public class MongoDBConfigurationTest {

    @Test
    public void testInit() throws Exception {
        MongoDBConfiguration mongoDBConfiguration = MongoDBConfiguration.builder().init()
                .add("writeConcern", "ACK")
                .build();
        System.out.println(mongoDBConfiguration.toJson());

        MongoClient client = new MongoClient("localhost");
        DB db = client.getDB("test");

        MongoDataStore mongoDataStore = new MongoDataStore(client, db, mongoDBConfiguration);
        
        assertNotNull(mongoDataStore);
        assertEquals(db, mongoDataStore.getDb());
        
        client.close();
    }
}
{'fraction_non_alphanumeric': 0.11651469098277609, 'fraction_numerical': 0.0060790273556231, 'mean_word_length': 3.284164859002169, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '2658433', 'n_tokens_mistral': 596, 'n_tokens_neox': 557, 'n_words': 118}