title: How to organize different java source folders in netbeans (for testing)?
body: <p>I am developing a project in Netbeans (8.0.2) that uses JUnit (4.x) for testing application code (in a Netbeans module). In the same module I also  have some integration tests. I found a way to separate application code, unit tests and integration tests by putting the latter into a separate folder under MODULE_PATH\test\qa-functional\src. By that, the Netbeans IDE puts those three semantical different kinds of classes into individual folders: </p>
  
  <p><img src="https://i.stack.imgur.com/5sjea.png" alt="Netbeans projects view with collapsed source, unit and functional test packages"></p>
  
  <p>The problem is, my functional tests tend to grow complex, so I would prefer to have them, well, unit tested. However if create a unit test (in the Unit Test Package) for a class of the functional test package, the test does not compile. Seems to be some class path issues.</p>
  
  <p><img src="https://i.stack.imgur.com/72HEw.png" alt="Netbeans projects view with expanded source, unit and functional test packages. IntegrationTestTest.java has an error"></p>
  
  <p>I know I can put the unit test of the functional test in the functional test package as well (and I will do so if this question does not provide me with some solution), but anyway, is there a way to solve this in Netbeans?</p>
  
  <p>I found a bad solution, changing the order of ant targets in common.xml (in line 610 of NB 8.0.2). But that is obiously not portable, changes with a new version of Netbeans,.. So not really a solution. See details in <a href="http://forums.netbeans.org/viewtopic.php?t=63066" rel="nofollow noreferrer">Netbeans Forum: <em>Classpath problem when unit testing functional tests</em></a></p>
  
  <p>In Eclipse, I would simply add a new source folder on the Java build path. But that mechanism does not exist in Netbeans?
  For clearification, I added a screenshot.</p>
  
  <p><img src="https://i.stack.imgur.com/dheYg.png" alt="Eclipse package explorer with separate unit test folders for src and functional test code"></p>
  
  <p>Thanks in advance for your help.</p>