Create new jUnit rule to provide functionality of test cases rerun on exceptions.
Test rule should have 2 parameters:
- retryCount - amount of retries before test should be failed.
- Array of exception classes on which retry should be performed.
Create new jUnit runner to provide functionality of test cases rerun on exceptions.
Functionality of runner should be same as functionality of rule, you have created.
Think about runner parameters, how runner could be configured ?