title: How to test all combinations of bad parameters?
body: <p>Let's assume a simple method which throws an <code>IndexOutOfBoundsException</code>
  for an invalid pair of indices (2d array).</p>
  
  <p>How would I test, that the exception is thrown for all combinations of bad
  indices ?</p>
  
  <p><em>(of course this test will not continue if
  one call throws an exception)</em></p>
  
  <pre><code>@Test(expected = Exception.class)
  public void validateIndices(){
      check(0,-1);
      check(-1,0);
      check(0,COLS + 1);
      check(ROWS + 1, 0);
  }
  </code></pre>
  
  <p>Is there a common way to test
  variations of parameters for a method ?</p>