You could reduce duplicate code by making a function and calling it in each JUnit test. E.g.:
public void test_add_zeroPlusZero()
{
Assert.assertTrue("Failed on 0+0.", testAdd(new int[] {0,0}),0);
}
private boolean testAdd(int[] values, int expectedValue)
{
// Try to add.
// If adding fails, return false.
// If adding succeeds, return true.
}
As for reading in huge numbers of test values, couldn't you just read in multiple rows of integers (representing the values to add and the expected result, each value separated by a space or something) from file and then put them through the testAdd function (or equivalent) shown above? In pseudocode, this might look like:
public void test_add_from_file()
File testValueFile = get file with test values()
while ((nextLine = testValueFile.readLine) != END_OF_FILE)
int[] values = parse values from nextLine
int expectedValue = parse expected value from nextLine
Assert.assertTrue("Couldn't add the following values: " + values, testAdd(values, expectedValue))