title: System.setProperty in JUnit tests
body: <p>I have two tests, we'll call them test A and test B. </p>
  
  <p>In test A we have this line </p>
  
  <pre><code>System.setProperty("&lt;interface&gt;", "&lt;implementation&gt;);
  </code></pre>
  
  <p>In test B we have that same line. </p>
  
  <p>When both lines exist, test B fails. When I comment out the line in test A, test B succeeds. If I do a </p>
  
  <pre><code>System.clearProperty("&lt;interface&gt;") 
  </code></pre>
  
  <p>test B fails.</p>
  
  <p>I have a similar issue with tests C and D with a different interface property. Test C sets it, test D does not. When I comment out the set call, D passes. When I don't. D fails. When I call clear, D fails.</p>
  
  <p>Calling clear and commenting out the line both cause B and D to have the "correct" value in that system property, however they fail when I call clear (despite having the same value as when the line is commented out) and succeed when commenting out. Anyone have any ideas why this is the case?</p>
  
  <p>Snippet showing what it does</p>
  
  <pre><code>System.setProperty("INTERFACE_NAME", "IMPLEMENTATION_NAME");
  
  //getOBJECT will now return a type of IMPLEMENTATION_NAME
  INTERFACE mockedINTERFACE = INTERFACE.getDirectory().getOBJECT(domain);
  </code></pre>