You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2020/03/08 13:46:26 UTC

[maven-shared-utils] branch unused created (now aade7f5)

This is an automated email from the ASF dual-hosted git repository.

elharo pushed a change to branch unused
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git.


      at aade7f5  remove unreachable code

This branch includes the following new commits:

     new aade7f5  remove unreachable code

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven-shared-utils] 01/01: remove unreachable code

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch unused
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git

commit aade7f553164fb7536e737ebe2bbf122541b4ac1
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Sun Mar 8 09:46:10 2020 -0400

    remove unreachable code
---
 .../maven/shared/utils/reflection/Reflector.java   |  573 ---------
 .../utils/reflection/ReflectorException.java       |   70 --
 .../shared/utils/reflection/ReflectorTest.java     | 1232 --------------------
 .../utils/reflection/ReflectorTestHelper.java      |  119 --
 4 files changed, 1994 deletions(-)

diff --git a/src/main/java/org/apache/maven/shared/utils/reflection/Reflector.java b/src/main/java/org/apache/maven/shared/utils/reflection/Reflector.java
deleted file mode 100644
index c4cb3b7..0000000
--- a/src/main/java/org/apache/maven/shared/utils/reflection/Reflector.java
+++ /dev/null
@@ -1,573 +0,0 @@
-package org.apache.maven.shared.utils.reflection;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Member;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Utility class used to instantiate an object using reflection. This utility hides many of the gory details needed to
- * do this.
- * 
- * @author John Casey
- */
-final class Reflector
-{
-    private static final String CONSTRUCTOR_METHOD_NAME = "$$CONSTRUCTOR$$";
-
-    private static final String GET_INSTANCE_METHOD_NAME = "getInstance";
-
-    private final Map<String, Map<String, Map<String, Member>>> classMaps =
-        new HashMap<String, Map<String, Map<String, Member>>>();
-
-    /**
-     * Ensure no instances of Reflector are created...this is a utility.
-     */
-    Reflector()
-    {
-    }
-
-    /**
-     * Create a new instance of a class, given the array of parameters... Uses constructor caching to find a constructor
-     * that matches the parameter types, either specifically (first choice) or abstractly...
-     * 
-     * @param theClass The class to instantiate
-     * @param params The parameters to pass to the constructor
-     * @return The instantiated object
-     * @throws ReflectorException In case anything goes wrong here...
-     */
-    public Object newInstance( Class<?> theClass, Object... params )
-        throws ReflectorException
-    {
-        if ( params == null )
-        {
-            params = new Object[0];
-        }
-
-        Class<?>[] paramTypes = new Class[params.length];
-
-        for ( int i = 0, len = params.length; i < len; i++ )
-        {
-            paramTypes[i] = params[i].getClass();
-        }
-
-        try
-        {
-            Constructor<?> con = getConstructor( theClass, paramTypes );
-
-            return con.newInstance( params );
-        }
-        catch ( InstantiationException ex )
-        {
-            throw new ReflectorException( ex );
-        }
-        catch ( InvocationTargetException ex )
-        {
-            throw new ReflectorException( ex );
-        }
-        catch ( IllegalAccessException ex )
-        {
-            throw new ReflectorException( ex );
-        }
-    }
-
-    /**
-     * Retrieve the singleton instance of a class, given the array of parameters... Uses constructor caching to find a
-     * constructor that matches the parameter types, either specifically (first choice) or abstractly...
-     * 
-     * @param theClass The class to retrieve the singleton of
-     * @param initParams The parameters to pass to the constructor
-     * @return The singleton object
-     * @throws ReflectorException In case anything goes wrong here...
-     */
-    public Object getSingleton( Class<?> theClass, Object... initParams )
-        throws ReflectorException
-    {
-        Class<?>[] paramTypes = new Class[initParams.length];
-
-        for ( int i = 0, len = initParams.length; i < len; i++ )
-        {
-            paramTypes[i] = initParams[i].getClass();
-        }
-
-        try
-        {
-            Method method = getMethod( theClass, GET_INSTANCE_METHOD_NAME, paramTypes );
-
-            return method.invoke( null, initParams );
-        }
-        catch ( InvocationTargetException ex )
-        {
-            throw new ReflectorException( ex );
-        }
-        catch ( IllegalAccessException ex )
-        {
-            throw new ReflectorException( ex );
-        }
-    }
-
-    /**
-     * Invoke the specified method on the specified target with the specified params...
-     * 
-     * @param target The target of the invocation
-     * @param methodName The method name to invoke
-     * @param params The parameters to pass to the method invocation
-     * @return The result of the method call
-     * @throws ReflectorException In case of an error looking up or invoking the method.
-     */
-    public Object invoke( Object target, String methodName, Object... params )
-        throws ReflectorException
-    {
-        if ( params == null )
-        {
-            params = new Object[0];
-        }
-
-        Class<?>[] paramTypes = new Class[params.length];
-
-        for ( int i = 0, len = params.length; i < len; i++ )
-        {
-            paramTypes[i] = params[i].getClass();
-        }
-
-        try
-        {
-            Method method = getMethod( target.getClass(), methodName, paramTypes );
-
-            return method.invoke( target, params );
-        }
-        catch ( InvocationTargetException ex )
-        {
-            throw new ReflectorException( ex );
-        }
-        catch ( IllegalAccessException ex )
-        {
-            throw new ReflectorException( ex );
-        }
-    }
-
-    public Object getStaticField( Class<?> targetClass, String fieldName )
-        throws ReflectorException
-    {
-        try
-        {
-            Field field = targetClass.getField( fieldName );
-
-            return field.get( null );
-        }
-        catch ( SecurityException e )
-        {
-            throw new ReflectorException( e );
-        }
-        catch ( NoSuchFieldException e )
-        {
-            throw new ReflectorException( e );
-        }
-        catch ( IllegalArgumentException e )
-        {
-            throw new ReflectorException( e );
-        }
-        catch ( IllegalAccessException e )
-        {
-            throw new ReflectorException( e );
-        }
-    }
-
-    public Object getField( Object target, String fieldName )
-        throws ReflectorException
-    {
-        return getField( target, fieldName, false );
-    }
-
-    public Object getField( Object target, String fieldName, boolean breakAccessibility )
-        throws ReflectorException
-    {
-        Class<?> targetClass = target.getClass();
-        while ( targetClass != null )
-        {
-            try
-            {
-                Field field = targetClass.getDeclaredField( fieldName );
-
-                boolean accessibilityBroken = false;
-                if ( !field.isAccessible() && breakAccessibility )
-                {
-                    field.setAccessible( true );
-                    accessibilityBroken = true;
-                }
-
-                Object result = field.get( target );
-
-                if ( accessibilityBroken )
-                {
-                    field.setAccessible( false );
-                }
-
-                return result;
-            }
-            catch ( SecurityException e )
-            {
-                throw new ReflectorException( e );
-            }
-            catch ( NoSuchFieldException e )
-            {
-                if ( targetClass == Object.class )
-                {
-                    throw new ReflectorException( e );
-                }
-                targetClass = targetClass.getSuperclass();
-            }
-            catch ( IllegalAccessException e )
-            {
-                throw new ReflectorException( e );
-            }
-        }
-        // Never reached, but needed to satisfy compiler
-        return null;
-    }
-
-    /**
-     * Invoke the specified static method with the specified params...
-     * 
-     * @param targetClass The target class of the invocation
-     * @param methodName The method name to invoke
-     * @param params The parameters to pass to the method invocation
-     * @return The result of the method call
-     * @throws ReflectorException In case of an error looking up or invoking the method.
-     */
-    public Object invokeStatic( Class<?> targetClass, String methodName, Object... params )
-        throws ReflectorException
-    {
-        if ( params == null )
-        {
-            params = new Object[0];
-        }
-
-        Class<?>[] paramTypes = new Class[params.length];
-
-        for ( int i = 0, len = params.length; i < len; i++ )
-        {
-            paramTypes[i] = params[i].getClass();
-        }
-
-        try
-        {
-            Method method = getMethod( targetClass, methodName, paramTypes );
-
-            return method.invoke( null, params );
-        }
-        catch ( InvocationTargetException ex )
-        {
-            throw new ReflectorException( ex );
-        }
-        catch ( IllegalAccessException ex )
-        {
-            throw new ReflectorException( ex );
-        }
-    }
-
-    /**
-     * Return the constructor, checking the cache first and storing in cache if not already there..
-     * 
-     * @param targetClass The class to get the constructor from
-     * @param params The classes of the parameters which the constructor should match.
-     * @return the Constructor object that matches, never {@code null}
-     * @throws ReflectorException In case we can't retrieve the proper constructor.
-     */
-    public Constructor<?> getConstructor( Class<?> targetClass, Class<?>... params )
-        throws ReflectorException
-    {
-        Map<String, Member> constructorMap = getConstructorMap( targetClass );
-
-        @SuppressWarnings( "checkstyle:magicnumber" )
-        StringBuilder key = new StringBuilder( 200 );
-
-        key.append( "(" );
-
-        for ( Class<?> param : params )
-        {
-            key.append( param.getName() );
-            key.append( "," );
-        }
-
-        if ( params.length > 0 )
-        {
-            key.setLength( key.length() - 1 );
-        }
-
-        key.append( ")" );
-
-        Constructor<?> constructor;
-
-        String paramKey = key.toString();
-
-        synchronized ( paramKey.intern() )
-        {
-            constructor = (Constructor<?>) constructorMap.get( paramKey );
-
-            if ( constructor == null )
-            {
-                Constructor<?>[] cands = targetClass.getConstructors();
-
-                for ( Constructor<?> cand : cands )
-                {
-                    Class<?>[] types = cand.getParameterTypes();
-
-                    if ( params.length != types.length )
-                    {
-                        continue;
-                    }
-
-                    for ( int j = 0, len2 = params.length; j < len2; j++ )
-                    {
-                        if ( !types[j].isAssignableFrom( params[j] ) )
-                        {
-                            continue;
-                        }
-                    }
-
-                    // we got it, so store it!
-                    constructor = cand;
-                    constructorMap.put( paramKey, constructor );
-                }
-            }
-        }
-
-        if ( constructor == null )
-        {
-            throw new ReflectorException( "Error retrieving constructor object for: " + targetClass.getName()
-                + paramKey );
-        }
-
-        return constructor;
-    }
-
-    public Object getObjectProperty( Object target, String propertyName )
-        throws ReflectorException
-    {
-        Object returnValue;
-
-        if ( propertyName == null || propertyName.trim().length() < 1 )
-        {
-            throw new ReflectorException( "Cannot retrieve value for empty property." );
-        }
-
-        String beanAccessor = "get" + Character.toUpperCase( propertyName.charAt( 0 ) );
-        if ( propertyName.trim().length() > 1 )
-        {
-            beanAccessor += propertyName.substring( 1 ).trim();
-        }
-
-        Class<?> targetClass = target.getClass();
-        Class<?>[] emptyParams = {};
-
-        Method method = _getMethod( targetClass, beanAccessor, emptyParams );
-        if ( method == null )
-        {
-            method = _getMethod( targetClass, propertyName, emptyParams );
-        }
-
-        if ( method != null )
-        {
-            try
-            {
-                returnValue = method.invoke( target, new Object[] {} );
-            }
-            catch ( IllegalAccessException e )
-            {
-                throw new ReflectorException( "Error retrieving property \'" + propertyName + "\' from \'"
-                    + targetClass + "\'", e );
-            }
-            catch ( InvocationTargetException e )
-            {
-                throw new ReflectorException( "Error retrieving property \'" + propertyName + "\' from \'"
-                    + targetClass + "\'", e );
-            }
-        }
-        else
-        {
-            returnValue = getField( target, propertyName, true );
-            if ( returnValue == null )
-            {
-                // TODO: Check if exception is the right action! Field exists, but contains null
-                throw new ReflectorException( "Neither method: \'" + propertyName + "\' nor bean accessor: \'"
-                    + beanAccessor + "\' can be found for class: \'" + targetClass + "\', and retrieval of field: \'"
-                    + propertyName + "\' returned null as value." );
-            }
-        }
-
-        return returnValue;
-    }
-
-    /**
-     * Return the method, checking the cache first and storing in cache if not already there..
-     * 
-     * @param targetClass The class to get the method from
-     * @param params The classes of the parameters which the method should match.
-     * @return the Method object that matches, never {@code null}
-     * @throws ReflectorException In case we can't retrieve the proper method.
-     */
-    public Method getMethod( Class<?> targetClass, String methodName, Class<?>... params )
-        throws ReflectorException
-    {
-        Method method = _getMethod( targetClass, methodName, params );
-
-        if ( method == null )
-        {
-            throw new ReflectorException( "Method: \'" + methodName + "\' not found in class: \'" + targetClass
-                                          + "\'" );
-        }
-
-        return method;
-    }
-
-    @SuppressWarnings( "checkstyle:methodname" )
-    private Method _getMethod( Class<?> targetClass, String methodName, Class<?>... params )
-        throws ReflectorException
-    {
-        Map<String, Member> methodMap = getMethodMap( targetClass, methodName );
-
-        @SuppressWarnings( "checkstyle:magicnumber" )
-        StringBuilder key = new StringBuilder( 200 );
-
-        key.append( "(" );
-
-        for ( Class<?> param : params )
-        {
-            key.append( param.getName() );
-            key.append( "," );
-        }
-
-        key.append( ")" );
-
-        Method method;
-
-        String paramKey = key.toString();
-
-        synchronized ( paramKey.intern() )
-        {
-            method = (Method) methodMap.get( paramKey );
-
-            if ( method == null )
-            {
-                Method[] cands = targetClass.getMethods();
-
-                for ( Method cand : cands )
-                {
-                    String name = cand.getName();
-
-                    if ( !methodName.equals( name ) )
-                    {
-                        continue;
-                    }
-
-                    Class<?>[] types = cand.getParameterTypes();
-
-                    if ( params.length != types.length )
-                    {
-                        continue;
-                    }
-
-                    for ( int j = 0, len2 = params.length; j < len2; j++ )
-                    {
-                        if ( !types[j].isAssignableFrom( params[j] ) )
-                        {
-                            continue;
-                        }
-                    }
-
-                    // we got it, so store it!
-                    method = cand;
-                    methodMap.put( paramKey, method );
-                }
-            }
-        }
-
-        return method;
-    }
-
-    /**
-     * Retrieve the cache of constructors for the specified class.
-     * 
-     * @param theClass the class to lookup.
-     * @return The cache of constructors.
-     * @throws ReflectorException in case of a lookup error.
-     */
-    private Map<String, Member> getConstructorMap( Class<?> theClass )
-        throws ReflectorException
-    {
-        return getMethodMap( theClass, CONSTRUCTOR_METHOD_NAME );
-    }
-
-    /**
-     * Retrieve the cache of methods for the specified class and method name.
-     * 
-     * @param theClass the class to lookup.
-     * @param methodName The name of the method to lookup.
-     * @return The cache of constructors.
-     */
-    private Map<String, Member> getMethodMap( Class<?> theClass, String methodName )
-    {
-        Map<String, Member> methodMap;
-
-        if ( theClass == null )
-        {
-            return null;
-        }
-
-        String className = theClass.getName();
-
-        synchronized ( className.intern() )
-        {
-            Map<String, Map<String, Member>> classMethods = classMaps.get( className );
-
-            if ( classMethods == null )
-            {
-                classMethods = new HashMap<String, Map<String, Member>>();
-                methodMap = new HashMap<String, Member>();
-                classMethods.put( methodName, methodMap );
-
-                classMaps.put( className, classMethods );
-            }
-            else
-            {
-                String key = className + "::" + methodName;
-
-                synchronized ( key.intern() )
-                {
-                    methodMap = classMethods.get( methodName );
-
-                    if ( methodMap == null )
-                    {
-                        methodMap = new HashMap<String, Member>();
-                        classMethods.put( methodName, methodMap );
-                    }
-                }
-            }
-        }
-
-        return methodMap;
-    }
-}
diff --git a/src/main/java/org/apache/maven/shared/utils/reflection/ReflectorException.java b/src/main/java/org/apache/maven/shared/utils/reflection/ReflectorException.java
deleted file mode 100644
index 76fa214..0000000
--- a/src/main/java/org/apache/maven/shared/utils/reflection/ReflectorException.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.apache.maven.shared.utils.reflection;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-/**
- * Exception indicating that an error has occurred while instantiating a class
- * with the Reflector class. This exception is meant to put a more user-friendly
- * face on the myriad other exceptions throws during reflective object creation.
- *
- * @author John Casey
- */
-class ReflectorException
-    extends Exception
-{
-    /**
-     * Create a new ReflectorException.
-     */
-    ReflectorException()
-    {
-    }
-
-    /**
-     * Create a new ReflectorException with the specified message.
-     *
-     * @param msg The message.
-     */
-    ReflectorException( String msg )
-    {
-        super( msg );
-    }
-
-    /**
-     * Create a new ReflectorException with the specified root cause.
-     *
-     * @param root The root cause.
-     */
-    ReflectorException( Throwable root )
-    {
-        super( root );
-    }
-
-    /**
-     * Create a new ReflectorException with the specified message and root
-     * cause.
-     *
-     * @param msg  The message.
-     * @param root The root cause.
-     */
-    ReflectorException( String msg, Throwable root )
-    {
-        super( msg, root );
-    }
-}
diff --git a/src/test/java/org/apache/maven/shared/utils/reflection/ReflectorTest.java b/src/test/java/org/apache/maven/shared/utils/reflection/ReflectorTest.java
deleted file mode 100644
index a3cceb2..0000000
--- a/src/test/java/org/apache/maven/shared/utils/reflection/ReflectorTest.java
+++ /dev/null
@@ -1,1232 +0,0 @@
-package org.apache.maven.shared.utils.reflection;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-import org.junit.Test;
-
-import java.lang.reflect.Constructor;
-
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import static org.apache.maven.shared.utils.testhelpers.ExceptionHelper.*;
-
-/**
- * @author Stephen Connolly
- */
-public class ReflectorTest
-{
-    private final Reflector reflector = new Reflector();
-
-    //// newInstance( Class, Object[] )
-
-    @Test( expected = NullPointerException.class )
-    public void newInstanceNullNull()
-        throws Exception
-    {
-        reflector.newInstance( (Class<?>)null, (Object)null );
-    }
-
-    @Test
-    public void newInstanceClassNull()
-        throws Exception
-    {
-        assertThat( reflector.newInstance( Object.class, null ), is( Object.class ) );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void newInstanceNullEmptyArray()
-        throws Exception
-    {
-        reflector.newInstance( null, new Object[0] );
-    }
-
-    @Test
-    public void newInstanceClassEmptyArray()
-        throws Exception
-    {
-        assertThat( reflector.newInstance( Object.class, new Object[0] ), is( Object.class ) );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void newInstanceClassInvalidSignature()
-        throws Exception
-    {
-        reflector.newInstance( Object.class, new Object[]{ this } );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void newInstancePrivateConstructor()
-        throws Exception
-    {
-        reflector.newInstance( ReflectorTestHelper.class, new Object[0] );
-    }
-
-    @Test( expected = IllegalArgumentException.class )
-    // // @ReproducesPlexusBug( "Looking up constructors by signature has an unlabelled continue, so finds the wrong constructor" )
-    public void newInstancePackageConstructor()
-        throws Exception
-    {
-        reflector.newInstance( ReflectorTestHelper.class, new Object[]{ Boolean.FALSE } );
-    }
-
-    @Test( expected = IllegalArgumentException.class )
-    // // @ReproducesPlexusBug( "Looking up constructors by signature has an unlabelled continue, so finds the wrong constructor" )
-    public void newInstancePackageConstructorThrowsSomething()
-        throws Exception
-    {
-        reflector.newInstance( ReflectorTestHelper.class, new Object[]{ Boolean.TRUE } );
-    }
-
-    @Test( expected = IllegalArgumentException.class )
-    // // @ReproducesPlexusBug("Looking up constructors by signature has an unlabelled continue, so finds the wrong constructor" )
-    public void newInstanceProtectedConstructor()
-        throws Exception
-    {
-        reflector.newInstance( ReflectorTestHelper.class, new Object[]{ 0 } );
-    }
-
-    @Test( expected = IllegalArgumentException.class )
-    // // @ReproducesPlexusBug( "Looking up constructors by signature has an unlabelled continue, so finds the wrong constructor" )
-    public void newInstanceProtectedConstructorThrowsSomething()
-        throws Exception
-    {
-        reflector.newInstance( ReflectorTestHelper.class, new Object[]{ 1 } );
-    }
-
-    @Test
-    public void newInstancePublicConstructor()
-        throws Exception
-    {
-        assertTrue( reflector.newInstance( ReflectorTestHelper.class, new Object[]{ "" } )
-                    instanceof ReflectorTestHelper );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void newInstancePublicConstructorNullValue()
-        throws Exception
-    {
-        reflector.newInstance( ReflectorTestHelper.class, new Object[]{ null } );
-    }
-
-    @Test
-    public void newInstancePublicConstructorThrowsSomething()
-        throws Exception
-    {
-        try
-        {
-            reflector.newInstance( ReflectorTestHelper.class, new Object[]{ "Message" } );
-            fail();
-        }
-        catch ( ReflectorException e )
-        {
-            assertThat( e, hasCause( ReflectorTestHelper.HelperException.class ) );
-        }
-    }
-
-    //// getSingleton( Class, Object[] )
-
-    @Test( expected = NullPointerException.class )
-    public void getSingletonNullNull()
-        throws Exception
-    {
-        reflector.getSingleton( (Class<?>)null, (Object)null );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getSingletonClassNull()
-        throws Exception
-    {
-        assertThat( reflector.getSingleton( (Class<?>)Object.class, (Object)null ), is( Object.class ) );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getSingletonNullEmptyArray()
-        throws Exception
-    {
-        reflector.getSingleton( null, new Object[0] );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void getSingletonClassEmptyArray()
-        throws Exception
-    {
-        assertThat( reflector.getSingleton( Object.class, new Object[0] ), is( Object.class ) );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void getSingletonClassInvalidSignature()
-        throws Exception
-    {
-        reflector.getSingleton( Object.class, new Object[]{ this } );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void getSingletonPrivateMethod()
-        throws Exception
-    {
-        reflector.getSingleton( ReflectorTestHelper.class, new Object[0] );
-    }
-
-    @Test( expected = IllegalArgumentException.class )
-    // @ReproducesPlexusBug( "Looking up methods by signature has an unlabeled continue, so finds the wrong method" )
-    public void getSingletonPackageMethod()
-        throws Exception
-    {
-        reflector.getSingleton( ReflectorTestHelper.class, new Object[]{ Boolean.FALSE } );
-    }
-
-    @Test( expected = IllegalArgumentException.class )
-    // @ReproducesPlexusBug( "Looking up methods by signature has an unlabeled continue, so finds the wrong method" )
-    public void getSingletonPackageMethodThrowsSomething()
-        throws Exception
-    {
-        reflector.getSingleton( ReflectorTestHelper.class, new Object[]{ Boolean.TRUE } );
-    }
-
-    @Test( expected = IllegalArgumentException.class )
-    // @ReproducesPlexusBug( "Looking up methods by signature has an unlabeled continue, so finds the wrong method" )
-    public void getSingletonProtectedMethod()
-        throws Exception
-    {
-        reflector.getSingleton( ReflectorTestHelper.class, new Object[]{ 0 } );
-    }
-
-    @Test( expected = IllegalArgumentException.class )
-    // @ReproducesPlexusBug( "Looking up methods by signature has an unlabeled continue, so finds the wrong method" )
-    public void getSingletonProtectedMethodThrowsSomething()
-        throws Exception
-    {
-        reflector.getSingleton( ReflectorTestHelper.class, new Object[]{ 1 } );
-    }
-
-    @Test
-    public void getSingletonPublicMethod()
-        throws Exception
-    {
-        assertTrue( reflector.getSingleton( ReflectorTestHelper.class, new Object[]{ "" } )
-                    instanceof ReflectorTestHelper );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getSingletonPublicMethodNullValue()
-        throws Exception
-    {
-        reflector.getSingleton( ReflectorTestHelper.class, new Object[]{ null } );
-    }
-
-    @Test
-    public void getSingletonPublicMethodThrowsSomething()
-        throws Exception
-    {
-        try
-        {
-            reflector.getSingleton( ReflectorTestHelper.class, new Object[]{ "Message" } );
-            fail();
-        }
-        catch ( ReflectorException e )
-        {
-            assertThat( e, hasCause( ReflectorTestHelper.HelperException.class ) );
-        }
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getSingletonNonStaticMethod()
-        throws Exception
-    {
-        assertTrue( reflector.getSingleton( ReflectorTestHelper.class, new Object[]{ "", Boolean.FALSE } )
-                    instanceof ReflectorTestHelper );
-    }
-
-    //// invoke( Object, String, Object[] )
-
-    @Test( expected = NullPointerException.class )
-    public void invokeNullNullNull()
-        throws Exception
-    {
-        reflector.invoke( (Object)null, (String)null, (Object)null );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void invokeNullNullEmpty()
-        throws Exception
-    {
-        reflector.invoke( null, null, new Object[0] );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void invokeNullEmptyNull()
-        throws Exception
-    {
-        reflector.invoke( (Object)null, "", (Object)null );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void invokeNullEmptyEmpty()
-        throws Exception
-    {
-        reflector.invoke( null, "", new Object[0] );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void invokeObjectNullNull()
-        throws Exception
-    {
-        reflector.invoke( new Object(), (String)null, (Object)null );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void invokeObjectNullEmpty()
-        throws Exception
-    {
-        reflector.invoke( new Object(), null, new Object[0] );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void invokeObjectEmptyNull()
-        throws Exception
-    {
-        reflector.invoke( new Object(), "", null );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void invokeObjectEmptyEmpty()
-        throws Exception
-    {
-        reflector.invoke( new Object(), "", new Object[0] );
-    }
-
-    @Test
-    public void invokeObjectValidNull()
-        throws Exception
-    {
-        Object object = new Object();
-        assertThat( reflector.invoke( object, "hashCode", null ), is( (Object) object.hashCode() ) );
-    }
-
-    @Test
-    public void invokeObjectValidEmpty()
-        throws Exception
-    {
-        Object object = new Object();
-        assertThat( reflector.invoke( object, "hashCode", new Object[0] ),
-                    is( (Object) object.hashCode() ) );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void invokeObjectValidWrongSignature()
-        throws Exception
-    {
-        reflector.invoke( new Object(), "hashCode", new Object[]{ this } );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void invokePrivateMethod()
-        throws Exception
-    {
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            private Object doSomething()
-            {
-                return "Done";
-            }
-        }
-        assertThat( reflector.invoke( new CoT(), "doSomething", new Object[0] ), is( (Object) "Done" ) );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void invokePackageMethod()
-        throws Exception
-    {
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            Object doSomething()
-            {
-                return "Done";
-            }
-        }
-        assertThat( reflector.invoke( new CoT(), "doSomething", new Object[0] ), is( (Object) "Done" ) );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void invokeProtectedMethod()
-        throws Exception
-    {
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            protected Object doSomething()
-            {
-                return "Done";
-            }
-        }
-        assertThat( reflector.invoke( new CoT(), "doSomething", new Object[0] ), is( (Object) "Done" ) );
-    }
-
-    @Test
-    public void invokePublicMethod()
-        throws Exception
-    {
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            public Object doSomething()
-            {
-                return "Done";
-            }
-        }
-        assertThat( reflector.invoke( new CoT(), "doSomething", new Object[0] ), is( (Object) "Done" ) );
-    }
-
-    //// getStaticField( Class, String )
-
-    @Test( expected = NullPointerException.class )
-    public void getStaticFieldNullNull()
-        throws Exception
-    {
-        reflector.getStaticField( null, null );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getStaticFieldNullEmpty()
-        throws Exception
-    {
-        reflector.getStaticField( null, "" );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getStaticFieldObjectNull()
-        throws Exception
-    {
-        reflector.getStaticField( Object.class, null );
-    }
-
-    @Test
-    public void getStaticFieldObjectEmpty()
-        throws Exception
-    {
-        try
-        {
-            reflector.getStaticField( Object.class, "" );
-            fail();
-        }
-        catch ( ReflectorException e )
-        {
-            assertThat( e, hasCause( NoSuchFieldException.class ) );
-        }
-    }
-
-    @Test
-    public void getStaticFieldPrivateField()
-        throws Exception
-    {
-        try
-        {
-            reflector.getStaticField( ReflectorTestHelper.class, "PRIVATE_STATIC_STRING" );
-            fail();
-        }
-        catch ( ReflectorException e )
-        {
-            assertThat( e, hasCause( NoSuchFieldException.class ) );
-        }
-    }
-
-    @Test
-    public void getStaticFieldPackageField()
-        throws Exception
-    {
-        try
-        {
-            reflector.getStaticField( ReflectorTestHelper.class, "PACKAGE_STATIC_STRING" );
-            fail();
-        }
-        catch ( ReflectorException e )
-        {
-            assertThat( e, hasCause( NoSuchFieldException.class ) );
-        }
-    }
-
-    @Test
-    public void getStaticFieldProtectedField()
-        throws Exception
-    {
-        try
-        {
-            reflector.getStaticField( ReflectorTestHelper.class, "PROTECTED_STATIC_STRING" );
-            fail();
-        }
-        catch ( ReflectorException e )
-        {
-            assertThat( e, hasCause( NoSuchFieldException.class ) );
-        }
-    }
-
-    @Test
-    public void getStaticFieldPublicField()
-        throws Exception
-    {
-        assertThat( reflector.getStaticField( ReflectorTestHelper.class, "PUBLIC_STATIC_STRING" ),
-                    is( (Object) "public static string" ) );
-    }
-
-    //// getField( Object, String )
-
-    @Test( expected = NullPointerException.class )
-    public void getFieldNullNull()
-        throws Exception
-    {
-        reflector.getField( null, null );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getFieldNullEmpty()
-        throws Exception
-    {
-        reflector.getField( null, "" );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getFieldObjectNull()
-        throws Exception
-    {
-        reflector.getField( new Object(), null );
-    }
-
-    @Test
-    public void getFieldObjectEmpty()
-        throws Exception
-    {
-        try
-        {
-            reflector.getField( new Object(), "" );
-            fail();
-        }
-        catch ( ReflectorException e )
-        {
-            assertThat( e, hasCause( NoSuchFieldException.class ) );
-        }
-    }
-
-    @Test
-    public void getFieldCoTValuePrivateField()
-        throws Exception
-    {
-        final String expected = "gotIt";
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            private String value = expected;
-        }
-        try
-        {
-            assertThat( reflector.getField( new CoT(), "value" ), is( (Object) expected ) );
-            fail();
-        }
-        catch ( ReflectorException e )
-        {
-            assertThat( e, hasCause( IllegalAccessException.class ) );
-        }
-    }
-
-    @Test
-    public void getFieldCoTValuePackageField()
-        throws Exception
-    {
-        final String expected = "gotIt";
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            String value = expected;
-        }
-        assertThat( reflector.getField( new CoT(), "value" ), is( (Object) expected ) );
-    }
-
-    @Test
-    public void getFieldCoTValueProtectedField()
-        throws Exception
-    {
-        final String expected = "gotIt";
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            protected String value = expected;
-        }
-        assertThat( reflector.getField( new CoT(), "value" ), is( (Object) expected ) );
-    }
-
-    @Test
-    public void getFieldCoTValuePublicField()
-        throws Exception
-    {
-        final String expected = "gotIt";
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            public String value = expected;
-        }
-        assertThat( reflector.getField( new CoT(), "value" ), is( (Object) expected ) );
-    }
-
-    //// getField( Object, String, boolean )
-
-    @Test( expected = NullPointerException.class )
-    public void getFieldNullNullFalse()
-        throws Exception
-    {
-        reflector.getField( null, null, false );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getFieldNullEmptyFalse()
-        throws Exception
-    {
-        reflector.getField( null, "", false );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getFieldObjectNullFalse()
-        throws Exception
-    {
-        reflector.getField( new Object(), null, false );
-    }
-
-    @Test
-    public void getFieldObjectEmptyFalse()
-        throws Exception
-    {
-        try
-        {
-            reflector.getField( new Object(), "", false );
-            fail();
-        }
-        catch ( ReflectorException e )
-        {
-            assertThat( e, hasCause( NoSuchFieldException.class ) );
-        }
-    }
-
-    @Test
-    public void getFieldCoTValueFalsePrivateField()
-        throws Exception
-    {
-        final String expected = "gotIt";
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            private String value = expected;
-        }
-        try
-        {
-            assertThat( reflector.getField( new CoT(), "value", false ), is( (Object) expected ) );
-            fail();
-        }
-        catch ( ReflectorException e )
-        {
-            assertThat( e, hasCause( IllegalAccessException.class ) );
-        }
-    }
-
-    @Test
-    public void getFieldCoTValueFalsePackageField()
-        throws Exception
-    {
-        final String expected = "gotIt";
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            String value = expected;
-        }
-        assertThat( reflector.getField( new CoT(), "value", false ), is( (Object) expected ) );
-    }
-
-    @Test
-    public void getFieldCoTValueFalseProtectedField()
-        throws Exception
-    {
-        final String expected = "gotIt";
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            protected String value = expected;
-        }
-        assertThat( reflector.getField( new CoT(), "value", false ), is( (Object) expected ) );
-    }
-
-    @Test
-    public void getFieldCoTValueFalsePublicField()
-        throws Exception
-    {
-        final String expected = "gotIt";
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            public String value = expected;
-        }
-        assertThat( reflector.getField( new CoT(), "value", false ), is( (Object) expected ) );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getFieldNullNullTrue()
-        throws Exception
-    {
-        reflector.getField( null, null, true );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getFieldNullEmptyTrue()
-        throws Exception
-    {
-        reflector.getField( null, "", true );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getFieldObjectNullTrue()
-        throws Exception
-    {
-        reflector.getField( new Object(), null, true );
-    }
-
-    @Test
-    public void getFieldObjectEmptyTrue()
-        throws Exception
-    {
-        try
-        {
-            reflector.getField( new Object(), "", true );
-            fail();
-        }
-        catch ( ReflectorException e )
-        {
-            assertThat( e, hasCause( NoSuchFieldException.class ) );
-        }
-    }
-
-    @Test
-    public void getFieldCoTValueTruePrivateField()
-        throws Exception
-    {
-        final String expected = "gotIt";
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            private String value = expected;
-        }
-        assertThat( reflector.getField( new CoT(), "value", true ), is( (Object) expected ) );
-    }
-
-    @Test
-    public void getFieldCoTValueTruePackageField()
-        throws Exception
-    {
-        final String expected = "gotIt";
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            String value = expected;
-        }
-        assertThat( reflector.getField( new CoT(), "value", true ), is( (Object) expected ) );
-    }
-
-    @Test
-    public void getFieldCoTValueTrueProtectedField()
-        throws Exception
-    {
-        final String expected = "gotIt";
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            protected String value = expected;
-        }
-        assertThat( reflector.getField( new CoT(), "value", true ), is( (Object) expected ) );
-    }
-
-    @Test
-    public void getFieldCoTValueTruePublicField()
-        throws Exception
-    {
-        final String expected = "gotIt";
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            public String value = expected;
-        }
-        assertThat( reflector.getField( new CoT(), "value", true ), is( (Object) expected ) );
-    }
-
-    //// invokeStatic( Class, String, Object[] )
-
-    @Test( expected = NullPointerException.class )
-    public void invokeStaticNullNullNull()
-        throws Exception
-    {
-        reflector.invokeStatic( (Class<?>)null, (String)null, (Object)null );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void invokeStaticClassNullNull()
-        throws Exception
-    {
-        assertThat( reflector.invokeStatic( Object.class, (String)null, (Object)null ), is( Object.class ) );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void invokeStaticNullNullEmptyArray()
-        throws Exception
-    {
-        reflector.invokeStatic( null, null, new Object[0] );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void invokeStaticClassNullEmptyArray()
-        throws Exception
-    {
-        assertThat( reflector.invokeStatic( Object.class, null, new Object[0] ), is( Object.class ) );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void invokeStaticNullEmptyNull()
-        throws Exception
-    {
-        reflector.invokeStatic( (Class<?>)null, "", (Object)null );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void invokeStaticClassEmptyNull()
-        throws Exception
-    {
-        reflector.invokeStatic( Object.class, "", null );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void invokeStaticNullEmptyEmptyArray()
-        throws Exception
-    {
-        reflector.invokeStatic( null, "", new Object[0] );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void invokeStaticClassEmptyEmptyArray()
-        throws Exception
-    {
-        assertThat( reflector.invokeStatic( Object.class, "", new Object[0] ), is( Object.class ) );
-    }
-
-    @Test( expected = IllegalArgumentException.class )
-    // @ReproducesPlexusBug( "Looking up methods by signature has an unlabelled continue, so finds the wrong method" )
-    public void invokeStaticClassInvalidSignature()
-        throws Exception
-    {
-        reflector.invokeStatic( ReflectorTestHelper.class, "getInstance", new Object[]{ this } );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void invokeStaticPrivateMethod()
-        throws Exception
-    {
-        reflector.invokeStatic( ReflectorTestHelper.class, "getInstance", new Object[0] );
-    }
-
-    @Test( expected = IllegalArgumentException.class )
-    // @ReproducesPlexusBug( "Looking up methods by signature has an unlabelled continue, so finds the wrong method" )
-    public void invokeStaticPackageMethod()
-        throws Exception
-    {
-        reflector.invokeStatic( ReflectorTestHelper.class, "getInstance", new Object[]{ Boolean.FALSE } );
-    }
-
-    @Test( expected = IllegalArgumentException.class )
-    // @ReproducesPlexusBug( "Looking up methods by signature has an unlabelled continue, so finds the wrong method" )
-    public void invokeStaticPackageMethodThrowsSomething()
-        throws Exception
-    {
-        reflector.invokeStatic( ReflectorTestHelper.class, "getInstance", new Object[]{ Boolean.TRUE } );
-    }
-
-    @Test( expected = IllegalArgumentException.class )
-    // @ReproducesPlexusBug( "Looking up methods by signature has an unlabelled continue, so finds the wrong method" )
-    public void invokeStaticProtectedMethod()
-        throws Exception
-    {
-        reflector.invokeStatic( ReflectorTestHelper.class, "getInstance", new Object[]{ 0 } );
-    }
-
-    @Test( expected = IllegalArgumentException.class )
-    // @ReproducesPlexusBug( "Looking up methods by signature has an unlabelled continue, so finds the wrong method" )
-    public void invokeStaticProtectedMethodThrowsSomething()
-        throws Exception
-    {
-        reflector.invokeStatic( ReflectorTestHelper.class, "getInstance", new Object[]{ 1 } );
-    }
-
-    @Test
-    public void invokeStaticPublicMethod()
-        throws Exception
-    {
-        assertTrue( reflector.invokeStatic( ReflectorTestHelper.class, "getInstance", new Object[]{ "" } )
-                    instanceof ReflectorTestHelper );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void invokeStaticPublicMethodNullValue()
-        throws Exception
-    {
-        reflector.invokeStatic( ReflectorTestHelper.class, "getInstance", new Object[]{ null } );
-    }
-
-    @Test
-    public void invokeStaticPublicMethodThrowsSomething()
-        throws Exception
-    {
-        try
-        {
-            reflector.invokeStatic( ReflectorTestHelper.class, "getInstance", new Object[]{ "Message" } );
-            fail();
-        }
-        catch ( ReflectorException e )
-        {
-            assertThat( e, hasCause( ReflectorTestHelper.HelperException.class ) );
-        }
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void invokeStaticNonStaticMethod()
-        throws Exception
-    {
-        assertTrue(
-            reflector.invokeStatic( ReflectorTestHelper.class, "getInstance", new Object[]{ "", Boolean.FALSE } )
-            instanceof ReflectorTestHelper );
-    }
-
-    //// getConstructor( Class, Class[] )
-
-    @Test( expected = NullPointerException.class )
-    public void getConstructorNullNull()
-        throws Exception
-    {
-        reflector.getConstructor( (Class<?>)null, (Class<?>)null );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getConstructorNullEmpty()
-        throws Exception
-    {
-        reflector.getConstructor( null, new Class[0] );
-    }
-
-    @SuppressWarnings( "rawtypes" )
-    @Test( expected = NullPointerException.class )
-    public void getConstructorObjectNull()
-        throws Exception
-    {
-        assertThat( reflector.getConstructor( Object.class, (Class<?>)null ),
-                    is( (Constructor) Object.class.getDeclaredConstructor() ) );
-    }
-
-    @SuppressWarnings( "rawtypes" )
-    @Test
-    public void getConstructorObjectEmpty()
-        throws Exception
-    {
-        assertThat( reflector.getConstructor( Object.class),
-                    is( (Constructor) Object.class.getDeclaredConstructor() ) );
-    }
-
-    @SuppressWarnings( "rawtypes" )
-    @Test( expected = ReflectorException.class )
-    // @ReproducesPlexusBug( "Looking up methods by signature has an unlabelled continue, so finds the wrong method" )
-    public void getConstructorPrivate()
-        throws Exception
-    {
-        assertThat( reflector.getConstructor( ReflectorTestHelper.class),
-                    is( (Constructor) ReflectorTestHelper.class.getDeclaredConstructor() ) );
-    }
-
-    @SuppressWarnings( "rawtypes" )
-    @Test
-    public void getConstructorPackage()
-        throws Exception
-    {
-        assertThat( reflector.getConstructor( ReflectorTestHelper.class, Boolean.class),
-                    not( is( (Constructor) ReflectorTestHelper.class.getDeclaredConstructor( Boolean.class ) ) ) );
-    }
-
-    @SuppressWarnings( "rawtypes" )
-    @Test
-    public void getConstructorProtected()
-        throws Exception
-    {
-        assertThat( reflector.getConstructor( ReflectorTestHelper.class, Integer.class),
-                    not( is( (Constructor) ReflectorTestHelper.class.getDeclaredConstructor( Integer.class ) ) ) );
-    }
-
-    @SuppressWarnings( "rawtypes" )
-    @Test
-    public void getConstructorPublic()
-        throws Exception
-    {
-        assertThat( reflector.getConstructor( ReflectorTestHelper.class, String.class),
-                    is( (Constructor) ReflectorTestHelper.class.getDeclaredConstructor( String.class ) ) );
-    }
-
-    //// getObjectProperty( Object, String )
-
-    @Test( expected = ReflectorException.class )
-    public void getObjectPropertyNullNull()
-        throws Exception
-    {
-        reflector.getObjectProperty( null, null );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void getObjectPropertyNullEmpty()
-        throws Exception
-    {
-        reflector.getObjectProperty( null, "" );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void getObjectPropertyObjectNull()
-        throws Exception
-    {
-        reflector.getObjectProperty( new Object(), null );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void getObjectPropertyObjectEmpty()
-        throws Exception
-    {
-        reflector.getObjectProperty( new Object(), "" );
-    }
-
-    @Test
-    // @ReproducesPlexusBug( "Should only access public properties" )
-    public void getObjectPropertyViaPrivateField()
-        throws Exception
-    {
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            private int value = 42;
-        }
-        assertThat( reflector.getObjectProperty( new CoT(), "value" ), is( (Object) 42 ) );
-    }
-
-    @Test
-    // @ReproducesPlexusBug( "Should only access public properties" )
-    public void getObjectPropertyViaPackageField()
-        throws Exception
-    {
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            int value = 42;
-        }
-        assertThat( reflector.getObjectProperty( new CoT(), "value" ), is( (Object) 42 ) );
-    }
-
-    @Test
-    // @ReproducesPlexusBug( "Should only access public properties" )
-    public void getObjectPropertyViaProtectedField()
-        throws Exception
-    {
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            protected int value = 42;
-        }
-        assertThat( reflector.getObjectProperty( new CoT(), "value" ), is( (Object) 42 ) );
-    }
-
-    @Test
-    public void getObjectPropertyViaPublicField()
-        throws Exception
-    {
-        class CoT
-        {
-            @SuppressWarnings( "unused" )
-            public int value = 42;
-        }
-        assertThat( reflector.getObjectProperty( new CoT(), "value" ), is( (Object) 42 ) );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void getObjectPropertyViaPrivateGetter()
-        throws Exception
-    {
-        class CoT
-        {
-            private final int _value = 42;
-
-            @SuppressWarnings( "unused" )
-            private int getValue()
-            {
-                return _value;
-            }
-        }
-        reflector.getObjectProperty( new CoT(), "value" );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void getObjectPropertyViaPackageGetter()
-        throws Exception
-    {
-        class CoT
-        {
-            private final int _value = 42;
-
-            @SuppressWarnings( "unused" )
-            int getValue()
-            {
-                return _value;
-            }
-        }
-        reflector.getObjectProperty( new CoT(), "value" );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void getObjectPropertyViaProtectedGetter()
-        throws Exception
-    {
-        class CoT
-        {
-            private final int _value = 42;
-
-            @SuppressWarnings( "unused" )
-            protected int getValue()
-            {
-                return _value;
-            }
-        }
-        reflector.getObjectProperty( new CoT(), "value" );
-    }
-
-    @Test
-    public void getObjectPropertyViaPublicGetter()
-        throws Exception
-    {
-        class CoT
-        {
-            private final int _value = 42;
-
-            @SuppressWarnings( "unused" )
-            public int getValue()
-            {
-                return _value;
-            }
-        }
-        assertThat( reflector.getObjectProperty( new CoT(), "value" ), is( (Object) 42 ) );
-    }
-
-    //// getMethod( Class, String, Class[] )
-
-    @Test( expected = NullPointerException.class )
-    public void getMethodNullNullNull()
-        throws Exception
-    {
-        reflector.getMethod( (Class<?>)null, (String)null, (Class<?>)null );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getMethodNullNullEmpty()
-        throws Exception
-    {
-        reflector.getMethod( null, null, new Class[0] );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getMethodObjectNullNull()
-        throws Exception
-    {
-        reflector.getMethod( Object.class, (String)null, (Class<?>)null );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getMethodObjectNullEmpty()
-        throws Exception
-    {
-        reflector.getMethod( Object.class, null, new Class[0] );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getMethodNullEmptyNull()
-        throws Exception
-    {
-        reflector.getMethod( (Class<?>)null, "", (Class<?>)null );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getMethodNullEmptyEmpty()
-        throws Exception
-    {
-        reflector.getMethod( null, "", new Class[0] );
-    }
-
-    @Test( expected = NullPointerException.class )
-    public void getMethodObjectEmptyNull()
-        throws Exception
-    {
-        reflector.getMethod( Object.class, "", (Class<?>)null );
-    }
-
-    @Test( expected = ReflectorException.class )
-    public void getMethodObjectEmptyEmpty()
-        throws Exception
-    {
-        reflector.getMethod( Object.class, "", new Class[0] );
-    }
-
-    @Test( expected = ReflectorException.class )
-    // @ReproducesPlexusBug( "Looking up methods by signature has an unlabelled continue, so finds the wrong method" )
-    public void getMethodPrivate()
-        throws Exception
-    {
-        assertThat( reflector.getMethod( ReflectorTestHelper.class, "getInstance", new Class[0] ),
-                    is( ReflectorTestHelper.class.getDeclaredMethod( "getInstance" ) ) );
-    }
-
-    @Test
-    public void getMethodPackage()
-        throws Exception
-    {
-        assertThat( reflector.getMethod( ReflectorTestHelper.class, "getInstance", new Class[]{ Boolean.class } ),
-                    not( is( ReflectorTestHelper.class.getDeclaredMethod( "getInstance", Boolean.class ) ) ) );
-    }
-
-    @Test
-    public void getMethodProtected()
-        throws Exception
-    {
-        assertThat( reflector.getMethod( ReflectorTestHelper.class, "getInstance", new Class[]{ Integer.class } ),
-                    not( is( ReflectorTestHelper.class.getDeclaredMethod( "getInstance", Integer.class ) ) ) );
-    }
-
-    @Test
-    public void getMethodPublic()
-        throws Exception
-    {
-        assertThat( reflector.getMethod( ReflectorTestHelper.class, "getInstance", new Class[]{ String.class } ),
-                    is( ReflectorTestHelper.class.getDeclaredMethod( "getInstance", String.class ) ) );
-    }
-
-}
diff --git a/src/test/java/org/apache/maven/shared/utils/reflection/ReflectorTestHelper.java b/src/test/java/org/apache/maven/shared/utils/reflection/ReflectorTestHelper.java
deleted file mode 100644
index 544df29..0000000
--- a/src/test/java/org/apache/maven/shared/utils/reflection/ReflectorTestHelper.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package org.apache.maven.shared.utils.reflection;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-/**
- *
- * @author stephenc
- */
-class ReflectorTestHelper
-{
-    static String PACKAGE_STATIC_STRING = "package static string";
-    protected static String PROTECTED_STATIC_STRING = "protected static string";
-    public static String PUBLIC_STATIC_STRING = "public static string";
-
-    private ReflectorTestHelper()
-    {
-    }
-
-    ReflectorTestHelper( Boolean throwSomething )
-    {
-        if ( Boolean.TRUE.equals( throwSomething ) )
-        {
-            throw new HelperException( "Something" );
-        }
-    }
-
-    protected ReflectorTestHelper( Integer throwCount )
-    {
-        if ( throwCount != null && throwCount > 0 )
-        {
-            throw new HelperException( "Something" );
-        }
-    }
-
-    public ReflectorTestHelper( String throwMessage )
-    {
-        if ( throwMessage != null && throwMessage.length() > 0  )
-        {
-            throw new HelperException( throwMessage );
-        }
-    }
-
-    static ReflectorTestHelper getInstance( Boolean throwSomething )
-    {
-        if ( Boolean.TRUE.equals( throwSomething ) )
-        {
-            throw new HelperException( "Something" );
-        }
-        return new ReflectorTestHelper();
-    }
-
-    protected static ReflectorTestHelper getInstance( Integer throwCount )
-    {
-        if ( throwCount != null && throwCount > 0 )
-        {
-            throw new HelperException( "Something" );
-        }
-        return new ReflectorTestHelper();
-    }
-
-    public static ReflectorTestHelper getInstance( String throwMessage )
-    {
-        if ( throwMessage != null && throwMessage.length() > 0 )
-        {
-            throw new HelperException( throwMessage );
-        }
-        return new ReflectorTestHelper();
-    }
-
-    public ReflectorTestHelper getInstance( String aString, Boolean aBoolean )
-    {
-        return new ReflectorTestHelper();
-    }
-
-    public static class HelperException
-        extends RuntimeException
-    {
-        /**
-         * 
-         */
-        private static final long serialVersionUID = -3395757415194358525L;
-
-        public HelperException()
-        {
-            super();    //To change body of overridden methods use File | Settings | File Templates.
-        }
-
-        public HelperException( String message )
-        {
-            super( message );    //To change body of overridden methods use File | Settings | File Templates.
-        }
-
-        public HelperException( String message, Throwable cause )
-        {
-            super( message, cause );    //To change body of overridden methods use File | Settings | File Templates.
-        }
-
-        public HelperException( Throwable cause )
-        {
-            super( cause );    //To change body of overridden methods use File | Settings | File Templates.
-        }
-    }
-}