title: Exception when using an enum member in parameterized test class with JUnit
body: <p>I have a parameterized test class with an enum member as parameter.</p>
  
  <pre><code>public enum MyEnum {
      A,
      B
  }
  </code></pre>
  
  <p>This is the significant part of the test class:</p>
  
  <pre><code>@ParameterizedRobolectricTestRunner.Parameters
  public static Collection&lt;Object[]&gt; data() {
      return Arrays.asList(new Object[][] {
              {MyEnum.A}
      });
  }
  
  public MyTestClass(MyEnum value) {
  }
  </code></pre>
  
  <p>When running the tests, I get this exception:</p>
  
  <pre><code>java.lang.IllegalArgumentException: argument type mismatch
  </code></pre>
  
  <p>If I change the constructor to</p>
  
  <pre><code>public MyTestClass(Object value) {
      MyEnum x = (MyEnum)value;
  }
  </code></pre>
  
  <p>I get this exception:</p>
  
  <pre><code>java.lang.ClassCastException: com.test.MyEnum cannot be cast to com.test.MyEnum
  </code></pre>
  
  <p>Can anybody tell me whats going on there? Especially the second case seems totally strange. I'm mainly a C# developer, so maybe this is special case in Java?
  If I use other data types like Integer it works fine.</p>
  
  <p>Thanks for helping!</p>
  
  <p>Edit: The enum has actually 8 members, I just changed it here. Also, the constructor has more than one parameter, I just simplified the example. The type of value is correctly com.test.MyEnum</p>
  
  <p>Edit2: The ParameterizedRobolectricTestRunner is the problem. If I use the (standard) Parameterized TestRunner, everything works fine. In this special case it is ok, since I don't test UI. But when testing UI, the problem would still occur.</p>