/**
 *  Copyright (C) 2015 Red Hat, Inc (jcasey@redhat.com)
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *          http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package org.commonjava.maven.ext.manip;

import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;

import java.io.File;
import java.util.*;

import static org.commonjava.maven.ext.manip.CliTestUtils.*;

@SuppressWarnings( "ConstantConditions" )
@RunWith( Parameterized.class )
public class DefaultCliIntegrationTest
{
    private static final List<String> EXCLUDED_FILES = new ArrayList<String>()
    {{
        add( "setup" );
        // Run in a separate test so a Mock server may be started.
        add("rest-dependency-version-manip-child-module");
    }};

    private static final Map<String, String> LOCATION_REWRITE = new HashMap<String, String>()
    {{
            put( "simple-numeric-directory-path", "simple-numeric-directory-path/parent" );
        }};

    @Parameters( name = "{0}" )
    public static Collection<Object[]> getFiles()
    {
        Collection<Object[]> params = new ArrayList<Object[]>();
        // Hack to allow a single parameterized test to be run.
        if ( System.getProperties().containsKey( "test-cli" ) )
        {
            params.add (new Object[] { System.getProperty("test-cli") } );
        }
        else
        {
            for ( File rl : new File( IT_LOCATION ).listFiles() )
            {
                if ( rl.isDirectory() && !EXCLUDED_FILES.contains( rl.getName() ) )
                {
                    Object[] arr = new Object[] { rl.getName() };
                    params.add( arr );
                }
            }
        }

        return params;
    }

    private String testRelativeLocation;

    public DefaultCliIntegrationTest( String testRelativeLocation )
    {
        this.testRelativeLocation = testRelativeLocation;
    }

    @BeforeClass
    public static void setUp()
        throws Exception
    {
        for ( File setupTest : new File( getDefaultTestLocation( "setup" ) ).listFiles() )
        {
            runMaven( "install", DEFAULT_MVN_PARAMS, setupTest.toString() );
        }
    }

    @Test
    public void testIntegration()
        throws Exception
    {
        String testRelativeLocation = this.testRelativeLocation;
        if ( LOCATION_REWRITE.containsKey( this.testRelativeLocation ) )
        {
            testRelativeLocation = LOCATION_REWRITE.get( this.testRelativeLocation );
        }

        String test = getDefaultTestLocation( testRelativeLocation );
        runLikeInvoker( test );
    }
}

@@ -851,110 +851,587 @@
 rs;%0A
-%0Aimport java.io.File;%0Aimport java.util.*;%0A%0Aimport static org.commonjava.maven.ext.manip.CliTestUtils.*
+import org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport java.io.File;%0Aimport java.util.ArrayList;%0Aimport java.util.Collection;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Aimport static org.commonjava.maven.ext.manip.CliTestUtils.DEFAULT_MVN_PARAMS;%0Aimport static org.commonjava.maven.ext.manip.CliTestUtils.IT_LOCATION;%0Aimport static org.commonjava.maven.ext.manip.CliTestUtils.getDefaultTestLocation;%0Aimport static org.commonjava.maven.ext.manip.CliTestUtils.runLikeInvoker;%0Aimport static org.commonjava.maven.ext.manip.CliTestUtils.runMaven
 ;%0A%0A@
@@ -1544,16 +1544,118 @@
 nTest%0A%7B%0A
+    private static final Logger LOGGER = LoggerFactory.getLogger( DefaultCliIntegrationTest.class );%0A%0A
     priv
@@ -3622,32 +3622,89 @@
 on );%0A        %7D%0A
+        LOGGER.info (%22Testing %7B%7D%22, testRelativeLocation);
 %0A        String 

Add logging