title: What is a test oracle and what is it used for?
body: <p>I don't really understand the concept of a <a href="http://en.wikipedia.org/wiki/Oracle_%28software_testing%29" rel="noreferrer">software testing oracle</a>. It says: </p>
  
  <blockquote>
    <p>An oracle is a mechanism for determining whether the program has passed or failed a test.</p>
  </blockquote>
  
  <p>Consider the following code:</p>
  
  <pre><code>// class that should be tested
  public int sum(int a, int b) {
    return a + b;
  }
  
  // test class
  static Main tester = new Main();
  @Test
  public void testSum() {
    assertEquals("2 + 3 is 5", 5, tester.sum(2, 3));
  }
  </code></pre>
  
  <p>The class that should be tested always returns the sum of 2 integers.<br>
  I pass as a parameter 2 and 3, and expect 5. 2 and 3 will be summed up and compared to the expected value (5). In this case the test succeeds.</p>
  
  <p>How exactly can an oracle help me here? Is an oracle involved in this example?</p>