imho to make the code unit-testable you have to inject the executor (or something else) otherwise the test will be either unstable or slow.