title: JUnit test doesnt do what expected
body: <p>I have question about JUnit tests. </p>
  
  <p>I am trying to test my code and for some unknown reason it keeps failing me all the time. This is code I try to test:</p>
  
  <pre><code>public void userInputWord() throws Exception{ 
      System.out.println("****Please input your word, 2 to 8 ***");
      System.out.println("**********character strings.**********");
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      inputWord = br.readLine();
      setInputWord(inputWord);
      setWordLenght(inputWord.length());          
      System.out.println("***Please input amount of words you***");
      System.out.println("*************want to find*************");
      try{
          stringLadder = br.readLine();
          setLadder(Integer.parseInt(stringLadder));
      }catch(NumberFormatException nfe){
          System.out.println("Your input must be integer value.");
      }
      searchForMatch();
  }
  </code></pre>
  
  <p>Basically this method is asking user to input two values (starting word and how many words he wants to see as a WordLadder) I am assigning those values to set methods. My JUnit for this class is following:</p>
  
  <pre><code>public void testUserInputWord() {
      Generation gener = new Generation();
      StringReader read = new StringReader("broom");
      Scanner scan = new Scanner(read);
      gener.setInputWord(scan.toString());
      assertEquals("broom", gener.getInputWord());
  }
  </code></pre>
  
  <p>I never wrote JUnit before and just did some research, could anyone explain what am I doing wrong?</p>