//we cannot use waitForExecutor... method since there will always be one job left
private void moveByHours(int hours) throws Exception {
processEngineConfiguration.getClock().setCurrentTime(new Date(processEngineConfiguration.getClock().getCurrentTime().getTime() + ((hours * 60 * 1000 * 60) + 5000)));
AsyncExecutor asyncExecutor = processEngineConfiguration.getAsyncExecutor();
asyncExecutor.start();
Thread.sleep(1000);
asyncExecutor.shutdown();
}