title: Expected values for Parameterized Junit test case for finding Max number in an array
body: <p>Parameterized junit test can be written to test for multiple values. In this case what should be in the expected value? 
  I'm storing the values to be tested as list, and the elements in the list are the candidates for the test data.</p>
  
  <pre><code> @RunWith(Parameterized.class)
  public class MaxInArrayTest {
  
      @Parameter
      public int[] a1;
  
      @Parameters
      public static Collection&lt;int[]&gt; data(){
          int[][] data = new int[][]{{1,2,3,4},{20,30,40,50}};
          return Arrays.asList(data);
      }
  
      @Test
      public void testMaxInArray(){
          MaxInArray maxInArray = new MaxInArray();
          Assert.assertEquals(maxInArray.findMax(a1), maxInArray.findMax(a1));
      }
  }
  </code></pre>
  
  <p>Although this works, to calculate expected value, it is calling the same method. I want to store the expected values and then check them against the actual values. How does it need to be done?</p>