title: junit: Tests that rely on each other
body: <p>I have an architectural dilemma regarding <code>JUnit</code> Test structure.</p>
  
  <p>The flow of my test class test the loading of a dictionary from a large file. The class may fail due to lack of memory, file not found, wrong file structure, and so on.</p>
  
  <p>On the first hand, it makes good sense to run the tests on a specific order: check for memory, then check if the file exists, then check for its structure. This would be very helpful, because if we don't have enough memory, the appropriate test would fail and give meaningful output, instead of the cryptic <code>OutOfMemoryException</code>. Moreover, I won't have to overgo the time-consuming process of reading the file over and over again.</p>
  
  <p>On the other hand, tests should be isolated, self contained entities.</p>
  
  <p>Any ideas how to desing the test suite?</p>