// Path: src/test/java/com/redhat/rcm/version/testutil/TestProjectFixture.java
// public static File getResourceFile( final String path )
// {
//     final URL resource = Thread.currentThread()
//                                .getContextClassLoader()
//                                .getResource( path );
//     if ( resource == null )
//     {
//         fail( "Resource not found: " + path );
//     }
// 
//     return new File( resource.getPath() );
// }
// 
// Path: src/test/java/com/redhat/rcm/version/testutil/TestProjectFixture.java
// public static Model loadModel( final String path )
//     throws IOException
// {
//     final File pom = getResourceFile( path );
//     return loadModel( pom );
// }
// 
// Path: src/test/java/com/redhat/rcm/version/testutil/TestProjectFixture.java
// public static VersionManagerSession newVersionManagerSession( final File workspace, final File reports, final String suffix, final String modifier )
// {
//     return new SessionBuilder( workspace, reports ).withVersionSuffix( suffix )
//                                                    .withVersionModifier( modifier )
//                                                    .build();
// }


import static com.redhat.rcm.version.testutil.TestProjectFixture.getResourceFile;
import static com.redhat.rcm.version.testutil.TestProjectFixture.loadModel;
import static com.redhat.rcm.version.testutil.TestProjectFixture.newVersionManagerSession;
import static org.apache.commons.io.FileUtils.readFileToString;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.assertThat;
import org.apache.maven.mae.project.key.FullProjectKey;
import org.apache.maven.model.Model;
import org.apache.maven.model.Plugin;
import org.codehaus.plexus.util.FileUtils;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
import com.redhat.rcm.version.fixture.LoggingFixture;
import com.redhat.rcm.version.mgr.AbstractVersionManagerTest;
import com.redhat.rcm.version.mgr.session.VersionManagerSession;
import java.io.File;
import java.util.List;
                                       new FullProjectKey( model ),
                                       model.getVersion(),
                                       pom.getParentFile(),
                                       session,
                                       false );

        assertNoErrors( session );
        final String pomStr = readFileToString( out );
        System.out.println( "Modified POM for " + name.getMethodName() + ":\n\n" + pomStr + "\n\n" );

        assertThat( pomStr.contains( "xmlns=\"http://maven.apache.org/POM/4.0.0\"" ), equalTo( true ) );
        assertThat( pomStr.contains( "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" ), equalTo( true ) );
        assertThat( pomStr.contains( "xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\"" ),
                    equalTo( true ) );

        // make sure we're not stranding all the other elements to be in some different, empty xmlns.
        assertThat( "Found empty xmlns! All non-plugin-config elements should be aligned to project element...",
                    pomStr.contains( "xmlns=\"\"" ),
                    equalTo( false ) );

        loadModel( out );
    }

    @BeforeClass
    public static void enableLogging()
    {
        LoggingFixture.setupLogging();
    }

    @Before
// Path: src/test/java/com/redhat/rcm/version/testutil/TestProjectFixture.java
// public static File getResourceFile( final String path )
// {
//     final URL resource = Thread.currentThread()
//                                .getContextClassLoader()
//                                .getResource( path );
//     if ( resource == null )
//     {
//         fail( "Resource not found: " + path );
//     }
// 
//     return new File( resource.getPath() );
// }
// 
// Path: src/test/java/com/redhat/rcm/version/testutil/TestProjectFixture.java
// public static Model loadModel( final String path )
//     throws IOException
// {
//     final File pom = getResourceFile( path );
//     return loadModel( pom );
// }
// 
// Path: src/test/java/com/redhat/rcm/version/testutil/TestProjectFixture.java
// public static VersionManagerSession newVersionManagerSession( final File workspace, final File reports, final String suffix, final String modifier )
// {
//     return new SessionBuilder( workspace, reports ).withVersionSuffix( suffix )
//                                                    .withVersionModifier( modifier )
//                                                    .build();
// }


// Path: src/test/java/com/redhat/rcm/version/util/PomUtilsTest.java
import static com.redhat.rcm.version.testutil.TestProjectFixture.getResourceFile;
import static com.redhat.rcm.version.testutil.TestProjectFixture.loadModel;
import static com.redhat.rcm.version.testutil.TestProjectFixture.newVersionManagerSession;
import static org.apache.commons.io.FileUtils.readFileToString;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.assertThat;
import org.apache.maven.mae.project.key.FullProjectKey;
import org.apache.maven.model.Model;
import org.apache.maven.model.Plugin;
import org.codehaus.plexus.util.FileUtils;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
import com.redhat.rcm.version.fixture.LoggingFixture;
import com.redhat.rcm.version.mgr.AbstractVersionManagerTest;
import com.redhat.rcm.version.mgr.session.VersionManagerSession;
import java.io.File;
import java.util.List;

                                       new FullProjectKey( model ),
                                       model.getVersion(),
                                       pom.getParentFile(),
                                       session,
                                       false );

        assertNoErrors( session );
        final String pomStr = readFileToString( out );
        System.out.println( "Modified POM for " + name.getMethodName() + ":\n\n" + pomStr + "\n\n" );

        assertThat( pomStr.contains( "xmlns=\"http://maven.apache.org/POM/4.0.0\"" ), equalTo( true ) );
        assertThat( pomStr.contains( "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" ), equalTo( true ) );
        assertThat( pomStr.contains( "xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\"" ),
                    equalTo( true ) );

        // make sure we're not stranding all the other elements to be in some different, empty xmlns.
        assertThat( "Found empty xmlns! All non-plugin-config elements should be aligned to project element...",
                    pomStr.contains( "xmlns=\"\"" ),
                    equalTo( false ) );

        loadModel( out );
    }

    @BeforeClass
    public static void enableLogging()
    {
        LoggingFixture.setupLogging();
    }

    @Before
    public void setup()