<commit_before>package org.twuni.money.treasury.client;

import java.util.Iterator;
import java.util.Set;

import org.apache.http.impl.client.DefaultHttpClient;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.twuni.money.common.Token;
import org.twuni.money.common.Treasury;

public class TreasuryClientTest {

	@Ignore
	@Test
	public void doSomething() {

		DefaultHttpClient client = new DefaultHttpClient();
		Treasury treasury = new TreasuryClient( client, "home.twuni.org" );

		Token original = treasury.create( 12345 );
		Set<Token> tokens = treasury.split( original, 10000 );

		Assert.assertEquals( 2, tokens.size() );

		Iterator<Token> it = tokens.iterator();
		Token merged = treasury.merge( it.next(), it.next() );

		Assert.assertEquals( original.getValue(), merged.getValue() );

	}

}<commit_msg>Refactoring merge into a new method for readability and changing the test host to localhost.<commit_after>package org.twuni.money.treasury.client;

import java.util.Iterator;
import java.util.Set;

import org.apache.http.impl.client.DefaultHttpClient;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.twuni.money.common.Token;
import org.twuni.money.common.Treasury;

public class TreasuryClientTest {

	@Ignore
	@Test
	public void doSomething() {

		DefaultHttpClient client = new DefaultHttpClient();
		Treasury treasury = new TreasuryClient( client, "localhost" );

		Token original = treasury.create( 12345 );
		Set<Token> tokens = treasury.split( original, 10000 );

		Assert.assertEquals( 2, tokens.size() );

		Token merged = merge( treasury, tokens );

		Assert.assertEquals( original.getValue(), merged.getValue() );

	}

	private Token merge( Treasury treasury, Set<Token> tokens ) {

		Iterator<Token> it = tokens.iterator();

		Token a = it.next();
		Token b = it.next();

		return treasury.merge( a, b );

	}

}
{'fraction_non_alphanumeric': 0.12375458835867856, 'fraction_numerical': 0.011536444677503933, 'mean_word_length': 4.6117647058823525, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '6988523', 'n_tokens_mistral': 648, 'n_tokens_neox': 572, 'n_words': 149}