title: Teardown() in Junit testing to reset fields
body: <p>Trying to do some JUnit testing, but it's been a while so I forget some stuff. If i'm testing a class, i make an object of the class in the @before() but then in the teardown am i not supposed to make it null? that way it erases any problems or anything that could interfere with my next test?</p>
  
  <p>so far i've done this.</p>
  
  <pre><code>package potluck.Testing;
  
  import static org.junit.Assert.*;
  
  import org.junit.After;
  import org.junit.Before;
  import org.junit.Test;
  
  import potluck.domain.Controller;
  /**
   * @author Samuel
   *
   */
    public class ControllerTest {
  
    /**
    * @throws java.lang.Exception
    */
  @Before
  public void setUp() throws Exception {
  
      Controller testCntlr = Controller.getInstance();
  }
  
  /**
   * @throws java.lang.Exception
   */
  @After
  public void tearDown() throws Exception {
  testCntlr() = null;
  }
  
  
  }
  </code></pre>
  
  <p>but it says it can't be resolved to a variable.</p>