title: How to make JUnit assertThat() work with lower bounded wildcard?
body: <p>initially, I had this piece of production code:</p>
  
  <pre><code>interface ActionSequence {
     public List&lt;Actions&gt; getActions();
  </code></pre>
  
  <p>I tested classes implementing that interface with something like this:</p>
  
  <pre><code>assertThat(sequenceUnderTest.getActions(), is(Arrays.asList(action1, action2));
  </code></pre>
  
  <p>Then I figured that it might be beneficial to change the production interface to:</p>
  
  <pre><code>public List&lt;? extends Action&gt; getActions() {
  </code></pre>
  
  <p>(to allow me to return lists of subclasses of Action).</p>
  
  <p>But now eclipse tells me:</p>
  
  <pre><code>The method assertThat(T, Matcher&lt;? super T&gt;) in the type Assert is not applicable for the arguments (List&lt;capture#1-of ? extends Action&gt;, Matcher&lt;List&lt;Action&gt;&gt;)
  </code></pre>
  
  <p>I figured: when I change the <strong>class</strong> that implements ActionInterface to do</p>
  
  <pre><code>@Override
  public List&lt;SomeSubClassOfAction&gt; getActions()
  </code></pre>
  
  <p>(instead of keeping the wildcard) ... then everything works. But why?</p>