extracted AbstractProxyFactoryAgnosticTest

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/proxy/trunk@1580986 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/src/test/java/org/apache/commons/proxy2/stub/AbstractProxyFactoryAgnosticTest.java b/test/src/test/java/org/apache/commons/proxy2/stub/AbstractProxyFactoryAgnosticTest.java
new file mode 100755
index 0000000..b34e9ba
--- /dev/null
+++ b/test/src/test/java/org/apache/commons/proxy2/stub/AbstractProxyFactoryAgnosticTest.java
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+package org.apache.commons.proxy2.stub;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.proxy2.ProxyFactory;
+import org.apache.commons.proxy2.asm4.ASM4ProxyFactory;
+import org.apache.commons.proxy2.cglib.CglibProxyFactory;
+import org.apache.commons.proxy2.javassist.JavassistProxyFactory;
+import org.apache.commons.proxy2.jdk.JdkProxyFactory;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameter;
+import org.junit.runners.Parameterized.Parameters;
+
+/**
+ * Conveniently defines the setup for a unit test class that runs with all known {@link ProxyFactory} implementations.
+ */
+@RunWith(Parameterized.class)
+public abstract class AbstractProxyFactoryAgnosticTest {
+
+    @Parameters(name = "{0}")
+    public static List<Object[]> createParameters() {
+        final List<Object[]> result = new ArrayList<Object[]>();
+        result.add(new Object[] { new JdkProxyFactory() });
+        result.add(new Object[] { new CglibProxyFactory() });
+        result.add(new Object[] { new JavassistProxyFactory() });
+        result.add(new Object[] { new ASM4ProxyFactory() });
+        return result;
+    }
+
+    @Parameter
+    public ProxyFactory proxyFactory;
+}
diff --git a/test/src/test/java/org/apache/commons/proxy2/stub/AbstractStubTestCase.java b/test/src/test/java/org/apache/commons/proxy2/stub/AbstractStubTestCase.java
index 17ca2af..2a464c9 100644
--- a/test/src/test/java/org/apache/commons/proxy2/stub/AbstractStubTestCase.java
+++ b/test/src/test/java/org/apache/commons/proxy2/stub/AbstractStubTestCase.java
@@ -5,33 +5,19 @@
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.List;
 
-import org.apache.commons.proxy2.ProxyFactory;
-import org.apache.commons.proxy2.asm4.ASM4ProxyFactory;
-import org.apache.commons.proxy2.cglib.CglibProxyFactory;
 import org.apache.commons.proxy2.invoker.NullInvoker;
-import org.apache.commons.proxy2.javassist.JavassistProxyFactory;
-import org.apache.commons.proxy2.jdk.JdkProxyFactory;
 import org.apache.commons.proxy2.provider.ObjectProviderUtils;
 import org.junit.Before;
 import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameter;
-import org.junit.runners.Parameterized.Parameters;
 
-@RunWith(Parameterized.class)
-public abstract class AbstractStubTestCase
+public abstract class AbstractStubTestCase extends AbstractProxyFactoryAgnosticTest
 {
     // ----------------------------------------------------------------------------------------------------------------------
     // Fields
     // ----------------------------------------------------------------------------------------------------------------------
 
-    @Parameter
-    public ProxyFactory proxyFactory;
     protected StubInterface target;
 
     // ----------------------------------------------------------------------------------------------------------------------
@@ -44,16 +30,6 @@
     // Other Methods
     // ----------------------------------------------------------------------------------------------------------------------
 
-    @Parameters(name = "{0}")
-    public static List<Object[]> createParameters() {
-        final List<Object[]> result = new ArrayList<Object[]>();
-        result.add(new Object[] { new JdkProxyFactory() });
-        result.add(new Object[] { new CglibProxyFactory() });
-        result.add(new Object[] { new JavassistProxyFactory() });
-        result.add(new Object[] { new ASM4ProxyFactory() });
-        return result;
-    }
-
     @Before
     public final void setUpProxyFactory()
     {