@Override
    public void run(Job job) throws Exception {
        getBackgroundJobWorker(job).run();
        if (Thread.currentThread().isInterrupted()) throw new InterruptedException();
    }
@Test
    void ifCurrentThreadIsInterrupted_AnInterruptExceptionIsThrown() throws Exception {
        final AbstractBackgroundJobRunner backgroundJobRunner = getJobRunner();
        final Job job = aJobInProgress().build();
        doAnswer(invocation -> {
            Thread.currentThread().interrupt();
            return null;
        }).when(worker).run();

        assertThatThrownBy(() -> backgroundJobRunner.run(job)).isInstanceOf(InterruptedException.class);
    }