<commit_before>package edu.harvard.iq.ip;

import edu.harvard.iq.dataverse.authorization.groups.impl.ipaddress.ip.IPv6Address;
import edu.harvard.iq.dataverse.authorization.groups.impl.ipaddress.ip.IpAddress;
import edu.harvard.iq.dataverse.authorization.groups.impl.ipaddress.ip.IPv4Address;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author michael
 */
public class IpAddressTest {
    
    @Test
    public void testValueOfIPv4() {
        assertEquals( new IPv4Address(127,0,0,1),
                    IpAddress.valueOf("127.0.0.1") );
    }
    
    @Test
    public void testValueOfIPv6() {
        assertEquals( new IPv6Address(0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x0, 0x0),
                      IpAddress.valueOf("a:b:c:d:e:f::"));
    }
    
}<commit_msg>Added a unit test to look at issue #1281<commit_after>package edu.harvard.iq.ip;

import edu.harvard.iq.dataverse.authorization.groups.impl.ipaddress.ip.IPv6Address;
import edu.harvard.iq.dataverse.authorization.groups.impl.ipaddress.ip.IpAddress;
import edu.harvard.iq.dataverse.authorization.groups.impl.ipaddress.ip.IPv4Address;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author michael
 */
public class IpAddressTest {
    
    @Test
    public void testValueOfIPv4() {
        assertEquals( new IPv4Address(127,0,0,1),
                    IpAddress.valueOf("127.0.0.1") );
        assertEquals( new IPv4Address(149,78,247,173),
                    IpAddress.valueOf("172.16.58.3") );
    }
    
    @Test
    public void testValueOfIPv6() {
        assertEquals( new IPv6Address(0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x0, 0x0),
                      IpAddress.valueOf("a:b:c:d:e:f::"));
    }
    
}
{'fraction_non_alphanumeric': 0.13599062133645956, 'fraction_numerical': 0.04689331770222743, 'mean_word_length': 2.915137614678899, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, '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': '7552409', 'n_tokens_mistral': 654, 'n_tokens_neox': 602, 'n_words': 94}