title: Refactoring static method / static field for Testing
body: <p>I have the following legacy code:</p>
  
  <pre><code>public class MyLegacyClass
  {
      private static final String jndiName = "java:comp/env/jdbc/LegacyDataSource"
  
      public static SomeLegacyClass doSomeLegacyStuff(SomeOtherLegacyClass legacyObj)
      {
         // do stuff using jndiName
      }
  }
  </code></pre>
  
  <p>This class is working in a J2EE-Container.</p>
  
  <p>Now I would like to test the class outside of the container.</p>
  
  <p>What is the best strategy?
  Refactoring is basically allowed.</p>
  
  <p>Accessing the LegacyDataSource is allowed (the test does not have to be a "pure" unit-test).</p>
  
  <p>EDIT: Introducing additional runtime-frameworks is not allowed.</p>