title: Java: test methods of different parameter orderings
body: <p>I want to correctly validate a method regardless of the parameter ordering.</p>
  
  <p>Therefore, snippet 1 and 2 should both pass the test case in snippet 3.</p>
  
  <p><strong>(snippet 1)</strong></p>
  
  <pre><code>public Integer compute_speed(Integer distance, Integer time) {  
      return distance/time;
  }
  </code></pre>
  
  <p><strong>(snippet 2)</strong></p>
  
  <pre><code>public Integer compute_speed(Integer time, Integer distance) {  
      return distance/time;
  }
  </code></pre>
  
  <p><strong>You can assume the two snippets as different code submissions by two students. And you can assume that the number of parameters can be as large as 10.</strong></p>
  
  <p>In the test case, I wrote,</p>
  
  <p><strong>(snippet 3)</strong></p>
  
  <pre><code> return compute_speed(3, 1).equals(3);
  </code></pre>
  
  <p>This validates snippet 1 but fails for 2. How can I make it such that both snippets pass the test case?</p>
  
  <p>If only there was something like, </p>
  
  <pre><code>return compute_speed(distance = 3, time = 1).equals(3);
  </code></pre>
  
  <p>Thanks in advance...</p>