title: Android test class fails to compile in eclipse with "bound mismatch" error
body: <p>I'm writing testcases for an android app extending <code>ActivityInstrumentationTestCase2</code>. The test class looks like this:</p>
  
  <pre><code>public class SolutionEntryActivityTest extends ActivityInstrumentationTestCase2&lt;SolutionEntryActivity&gt; {
  
      public SolutionEntryActivityTest() {
  
          super(SolutionEntryActivity.class);
      }
  }
  </code></pre>
  
  <p>In eclipse, this code fails to compile with the error: <code>Bound mismatch: The type SolutionEntryActivity is not a valid substitute for the bounded parameter &lt;T extends Activity&gt; of the type ActivityInstrumentationTestCase2&lt;T&gt;</code></p>
  
  <p>But SolutionEntryActivity really is an <code>android.app.Activity</code>, the type hierarchy is like this:</p>
  
  <pre><code>Activity
      OrmLiteBaseActivity&lt;H&gt; (abstract)
          KabowieActivity
              PracticeActivity (abstract)
                  SolutionEntryActivity
  </code></pre>
  
  <p>I found two eclipse bugs from <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=62822">2004</a> and <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=85262">2005</a> which seem to deal with a similar problem but these should be long fixed.</p>
  
  <p>I'm using Eclipse Helios with Android 2.2 and Sun Java 1.6.</p>
  
  <p>Any idea what's going on?</p>