title: junit test: configuration file with path variable to the resources
body: <p>I have an AttributesLoader class which picks a configuration file, retrieves variables and sets it's values to objects.</p>
  
  <p>Example:</p>
  
  <pre><code>   if (validatePropertyValue(configuration.getString(PROPERTY_RECORD_LIMIT))) {
                  extractionAttributesBuilder.setRecordLimit(configuration.getInt(PROPERTY_RECORD_LIMIT));
              }
  </code></pre>
  
  <p>Code works fine but I struggle to write test for some of the attributes.
  Because the code picks up a file, I have a cfg file in my src/test/resources.
  One of the properties is a path to a directory..</p>
  
  <p>I tried doing it this way:</p>
  
  <pre><code>path=new File(AttributesLoaderTest.class.getResource("/extractPath").getPath()));
  </code></pre>
  
  <p>but it doesn't work because it looks for a path:
  new File(AttributesLoaderTest.class.getResource("/extractPath").getPath())); which is useless..</p>
  
  <p>My question is:</p>
  
  <p>How can I provide a path in a file to my src/test/resources directory without it being hardoced?</p>
  
  <pre><code>path=/extractPath
  </code></pre>