// Path: src/test/java/org/neo4j/index/Neo4jTestCase.java
// public static <T> void assertContains( Collection<T> collection,
//     T... expectedItems )
// {
//     String collectionString = join( ", ", collection.toArray() );
//     assertEquals( collectionString, expectedItems.length,
//         collection.size() );
//     for ( T item : expectedItems )
//     {
//         assertTrue( collection.contains( item ) );
//     }
// }


import org.neo4j.graphdb.Transaction;
import org.neo4j.graphdb.index.Index;
import org.neo4j.test.ImpermanentGraphDatabase;
import static org.junit.Assert.assertEquals;
import static org.neo4j.index.Neo4jTestCase.assertContains;
import java.util.Arrays;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Node;
        {
            if ( success )
            {
                tx.success();
            }
            tx.finish();
            tx = null;
        }
    }

    public void beginTx()
    {
        if ( tx == null )
        {
            tx = graphDb.beginTx();
        }
    }

    void restartTx()
    {
        finishTx( true );
        beginTx();
    }
    
    @Test
    public void makeSureIndexNamesCanBeRead()
    {
        assertEquals( 0, graphDb.index().nodeIndexNames().length );
        String name1 = "my-index-1";
        Index<Node> nodeIndex1 = graphDb.index().forNodes( name1 );
// Path: src/test/java/org/neo4j/index/Neo4jTestCase.java
// public static <T> void assertContains( Collection<T> collection,
//     T... expectedItems )
// {
//     String collectionString = join( ", ", collection.toArray() );
//     assertEquals( collectionString, expectedItems.length,
//         collection.size() );
//     for ( T item : expectedItems )
//     {
//         assertTrue( collection.contains( item ) );
//     }
// }


// Path: src/test/java/org/neo4j/index/impl/lucene/TestIndexNames.java
import org.neo4j.graphdb.Transaction;
import org.neo4j.graphdb.index.Index;
import org.neo4j.test.ImpermanentGraphDatabase;
import static org.junit.Assert.assertEquals;
import static org.neo4j.index.Neo4jTestCase.assertContains;
import java.util.Arrays;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Node;

        {
            if ( success )
            {
                tx.success();
            }
            tx.finish();
            tx = null;
        }
    }

    public void beginTx()
    {
        if ( tx == null )
        {
            tx = graphDb.beginTx();
        }
    }

    void restartTx()
    {
        finishTx( true );
        beginTx();
    }
    
    @Test
    public void makeSureIndexNamesCanBeRead()
    {
        assertEquals( 0, graphDb.index().nodeIndexNames().length );
        String name1 = "my-index-1";
        Index<Node> nodeIndex1 = graphDb.index().forNodes( name1 );
        assertContains( Arrays.asList( graphDb.index().nodeIndexNames() ), name1 );