title: Eclipse - Java Template - static import - Template variable '' has incompatible types
body: <p>I want to create a Java code template (Preferences -> Java -> Editor -> Templates) for a JUnit4 test method that should also include a static import to use some hamcrest matchers. </p>
  
  <pre><code>${:importStatic('org.hamcrest.MatcherAssert.*')}
  ${:import(org.junit.Test)}
  @Test
  public void ${testName}() throws Exception {    
      ${cursor} 
  }
  </code></pre>
  
  <p>I am not able to save the code template - an error message is shown:</p>
  
  <blockquote>
    <p>Template variable '' has incompatible types.</p>
  </blockquote>
  
  <p>It works fine with either import statement, so the syntax seems to be correct.</p>
  
  <p>How can I combine the two import statements to work together?</p>