title: Multiple versions of tested app tested by one JUnit test
body: <p>Our app is as follows:
  [Frontend] &lt;-restAPI-> [Backend]
  Backend supposed to be always at the latest version and can support multiple versions of the frontend, like Ver1, Ver2, etc. There could be minor changes in the restAPI protocol or even how the frontend reacts (more function or different behavior).</p>
  
  <p>This test project tests correct communication, how the frontend behaves and backend for serving right data.
  We would like to have the same test project branch to be used for all supported versions, right now there are really only minor differences so our java test code have</p>
  
  <pre><code>if (version == "ver1") {
      ....
  } else if (version == "ver2") {
      ....
  }
  </code></pre>
  
  <p>Question is what is the most elegant way to split the versions ? Right now it works, but as version number will rise it would became a mess.
  I thought like to have a parent @Test method and decide which child test to run according to the version.</p>
  
  <pre><code>BasicTest.java
  BasicVer1Test.java
  BasicVer2Test.java
  </code></pre>
  
  <p>Question is if my idea is good, maybe somebody faced similar problem.</p>