title: Argument type mismatch in JUnit
body: <p>I'm fairly new to Selenium webdriver and Java, previously I used Selenium IDE. I'm trying to read testdata from an Excel sheet. Which is then written to Eclipse console, which works, and should be used to execute the actual test, which doesn't work. The actual test is not executed because I get an error argument type mismatch. The code looks like this:</p>
  
  <pre><code>package Test_Excel;
  
  import java.io.FileInputStream;
  import java.io.IOException;
  import java.util.Arrays;
  import org.junit.Assert;
  import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.junit.runners.Parameterized;
  import org.junit.runners.Parameterized.Parameters;
  import jxl.Sheet;
  import jxl.Workbook;
  import jxl.read.biff.BiffException;
  
  @RunWith(Parameterized.class)
  public class TestWithExcelData {
  
      // Our two parameters
      private final int input;
      private final int resultExpected;
  
      // Constructor
      public TestWithExcelData(int input, int result) {
          this.input = input;
          this.resultExpected = result;
      }
  
      @Parameters
      public static Iterable&lt;Object []&gt; data() throws BiffException, IOException
      {
  
          String FilePath = "C://Selenium//workspace//testproject//src//testdata//TestData.xls";
          FileInputStream fs = new FileInputStream(FilePath);
  
          Object[][] object = new Object[6][2];
          Workbook wb = Workbook.getWorkbook(fs);
          //locate the excel file in the local machine
  
          Sheet sheet = wb.getSheet("IOResult");
          int i=1; //avoid header row
          while(!(sheet.getCell(0, i).getContents().equals("end"))) //read data till it reaches the cell whose text is ‘end’
          {
  
              object[i-1][0]=sheet.getCell(0, i).getContents();
              object[i-1][1]=sheet.getCell(1, i).getContents();
              System.out.print(sheet.getCell(0, i).getContents() + "\t");
              System.out.print(sheet.getCell(1, i).getContents() + "\t");
              System.out.println();
              i++;
  
          }
          return Arrays.asList(object);
      }
  
      @Test
      public void testSquareOff(){
          Assert.assertEquals(resultExpected, MathUtils.square(input));
      }
  }
  </code></pre>
  
  <p>Is there somebody who can point me in the right direction?</p>
  
  <p>Thanks in advance</p>