title: In Java why this error: 'attribute value must be constant'?
body: <p>I have some TestNG code, where I am passing a Test annotation parameter called <code>timeOut = TESTNG_TEST_TIMEOUT</code> .</p>
  
  <pre><code>@Test(description = "Tests something.", groups = { "regression" }, 
     timeOut = TESTNG_TEST_TIMEOUT, enabled = true)
  </code></pre>
  
  <p>And in my TestBase class I have this member:</p>
  
  <pre><code>public final static long TESTNG_TEST_TIMEOUT = TimeUnit.MINUTES.toMillis(5);
  </code></pre>
  
  <p>When I use the above line of code, I get a 'attribute value must be constant' error in Eclipse.</p>
  
  <p>But, if I simply define the member like so, it works:</p>
  
  <pre><code>public final static long TESTNG_TEST_TIMEOUT = 300000;
  </code></pre>
  
  <p>Is the use of TimeUnit not a constant?</p>