Let the two test cases from the same test class to run in parallel. For that we need a special JUnit test runner that would use a thread pool executor to run the tests.
The runner should be flexible enough to:
- prevent certain test cases from being executed at the same time,
- let some test cases run in isolation, i.e. sequentially