title: Junit: splitting integration test and Unit tests
body: <p>I've inherited a load of Junit test, but these tests (apart from most not working) are a mixture of actual unit test and integration tests (requiring external systems, db etc).</p>
  
  <p>So I'm trying to think of a way to actually separate them out, so that I can run the unit test nice and quickly and the integration tests after that. </p>
  
  <p>The options are..</p>
  
  <ol>
  <li><p>Split them into separate directories.</p></li>
  <li><p>Move to Junit4 (from v3) and annotate the classes to separate them.</p></li>
  <li><p>Use a file naming convention to tell what a class is , i.e. AdapterATest and 
  AdapterAIntergrationTest.</p></li>
  </ol>
  
  <p>3 has the issue that Eclipse has the option to "Run all tests in the selected project/package or folder". So it would make it very hard to just run the integration tests.</p>
  
  <p>2: runs the risk that developers might start writing integration tests in unit test classes and it just gets messy.</p>
  
  <p>1: Seems like the neatest solution, but my gut says there must be a better solution out there.</p>
  
  <p>So that is my question, how do you lot break apart integration tests and proper unit tests?</p>