title: Reflection Exception in parameterized JUnit test using array parameter
body: <p>I tried to setup a parameterized test in JUnit 4.11 which generates a <strong>single</strong> parameter. This parameter, however, needs to be an array itself.</p>
  
  <p>The expected behavior for the following code snippet would be that <code>test()</code> is run twice while <code>arguments</code> holds an array <code>{"test1", "test2"}</code> in the first run and an array <code>{"test3", "test4"}</code> in the second run.</p>
  
  <pre><code>@RunWith(Parameterized.class)
  public class Tester {
  
      @Parameter
      private String[] arguments;
  
      @Parameters
      public static Iterable&lt;Object[]&gt; data() {
          return Arrays.asList(
                  new Object[][]{
                      {new String[] {"test1","test2"}},
                      {new String[] {"test3","test4"}}
                  }
          );  
      }
  
      @Test
      public void test() {
          fail();
      }
  }
  </code></pre>
  
  <p>When I execute the test, however, a <code>SlowCheckMemberAccess</code> Exception is thrown. Google delivered no results for that kind of problem. </p>
  
  <p>Can anyone explain what is going wrong here?</p>
  
  <p>The unfiltered JUnit trace is:</p>
  
  <pre><code>java.lang.IllegalAccessException: Class org.junit.runners.Parameterized$TestClassRunnerForParameters can not access a member of class org.mafagafogigante.dungeon.entity.creatures.Tester with modifiers "private"
  at sun.reflect.Reflection.ensureMemberAccess(Unknown Source)
  at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(Unknown Source)
  at java.lang.reflect.AccessibleObject.checkAccess(Unknown Source)
  at java.lang.reflect.Field.set(Unknown Source)
  at org.junit.runners.Parameterized$TestClassRunnerForParameters.createTestUsingFieldInjection(Parameterized.java:201)
  at org.junit.runners.Parameterized$TestClassRunnerForParameters.createTest(Parameterized.java:179)
  at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:244)
  at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
  at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:241)
  at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
  at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
  at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
  at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
  at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
  at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
  at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
  at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
  at org.junit.runners.Suite.runChild(Suite.java:127)
  at org.junit.runners.Suite.runChild(Suite.java:26)
  at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
  at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
  at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
  at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
  at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
  at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
  at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
  at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
  </code></pre>