title: JUnit Testing: It throws java.lang.NullPointerException when testing a pair of String related setter and getter
body: <p>here is my class that needed to test:</p>
  
  <pre><code>public class RankingTableModel {
  
  /**
   * filePath stores the path of a csv file.
   */
  private String filePath = "";
  
  /**
   * table data represents all the data in the table cells.
   */
  private Object[][] table_data;
  
  public String getFilePath () {
      return filePath;
  }
  
  public void setFilePath (String filePath) {
      this.filePath = filePath;
  }
  </code></pre>
  
  <p>here is my JUnit test class (for @Before, @After, .etc, I didn't do any thing special, just  print some messages):</p>
  
  <pre><code>public class RankingTableModelTest {
  
  private static final Object[][] data = {
              {"US", new Integer(1), new Integer(2), new Integer(2),
                  new Integer(3)},
              {"UK", new Integer(2), new Integer(2), new Integer(1),
                  new Integer(2)},
              {"CHN", new Integer(3), new Integer(1), new Integer(3),
                  new Integer(1)},
          };
  
  private static final String file_path = "test";
  
  private RankingTableModel test_model;
  
  
  @Test
  public void setFilePathAndGetFilePath() {
  
      System.out.println("Testing setFilePath and getFilePath.");
      test_model.setFilePath(file_path);
      assertEquals(test_model.getFilePath(),"test");
  }
  </code></pre>
  
  <p>}</p>
  
  <p>When I run the test, it throws an exception: 
  java.lang.NullPointerException
      at <em>*</em>.RankingTableModelTest.setFilePathAndGetFilePath(RankingTableModelTest.java:51)
  51 is the number of line : test_model.setFilePath(file_path);</p>
  
  <p>What is the problem with my code? Thx :)</p>