// Path: src/main/java/com/cedarsoftware/util/StringUtilities.java
// public static int hashCodeIgnoreCase(String s)
// {
//     if (s == null)
//     {
//         return 0;
//     }
//     final int len = s.length();
//     int hash = 0;
//     for (int i = 0; i < len; i++)
//     {
//         hash = 31 * hash + Character.toLowerCase((int)s.charAt(i));
//     }
//     return hash;
// }


import org.junit.Test;
import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;
import java.util.Random;
import java.util.Set;
import java.util.TreeSet;
import static com.cedarsoftware.util.StringUtilities.hashCodeIgnoreCase;
import static org.junit.Assert.*;
    }

    @Test(expected=IllegalArgumentException.class)
    public void testCreateStringWithInvalidEncoding() {
        StringUtilities.createString(new byte[] {102, 111, 111}, "baz");
    }

    @Test
    public void testCreateUtf8String()
    {
        assertEquals("foo", StringUtilities.createUtf8String(new byte[] {102, 111, 111}));
    }

    @Test
    public void testCreateUtf8StringWithNull()
    {
        assertNull(null, StringUtilities.createUtf8String(null));
    }

    @Test
    public void testCreateUtf8StringWithEmptyArray()
    {
        assertEquals("", StringUtilities.createUtf8String(new byte[]{}));
    }

    @Test
    public void testHashCodeIgnoreCase()
    {
        String s = "Hello";
        String t = "HELLO";
// Path: src/main/java/com/cedarsoftware/util/StringUtilities.java
// public static int hashCodeIgnoreCase(String s)
// {
//     if (s == null)
//     {
//         return 0;
//     }
//     final int len = s.length();
//     int hash = 0;
//     for (int i = 0; i < len; i++)
//     {
//         hash = 31 * hash + Character.toLowerCase((int)s.charAt(i));
//     }
//     return hash;
// }


// Path: src/test/java/com/cedarsoftware/util/TestStringUtilities.java
import org.junit.Test;
import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;
import java.util.Random;
import java.util.Set;
import java.util.TreeSet;
import static com.cedarsoftware.util.StringUtilities.hashCodeIgnoreCase;
import static org.junit.Assert.*;

    }

    @Test(expected=IllegalArgumentException.class)
    public void testCreateStringWithInvalidEncoding() {
        StringUtilities.createString(new byte[] {102, 111, 111}, "baz");
    }

    @Test
    public void testCreateUtf8String()
    {
        assertEquals("foo", StringUtilities.createUtf8String(new byte[] {102, 111, 111}));
    }

    @Test
    public void testCreateUtf8StringWithNull()
    {
        assertNull(null, StringUtilities.createUtf8String(null));
    }

    @Test
    public void testCreateUtf8StringWithEmptyArray()
    {
        assertEquals("", StringUtilities.createUtf8String(new byte[]{}));
    }

    @Test
    public void testHashCodeIgnoreCase()
    {
        String s = "Hello";
        String t = "HELLO";
        assert hashCodeIgnoreCase(s) == hashCodeIgnoreCase(t);