}
}
public void testRetryInterceptor() {
RetryInterceptor retryInterceptor = new RetryInterceptor();
retryInterceptor.setNext(new CommandExecutorImpl());
try {
retryInterceptor.execute(new CommandThrowingOptimisticLockingException());
fail("ProcessEngineException expected.");
}catch (ProcessEngineException e) {
assertTrue(e.getMessage().contains(retryInterceptor.getNumOfRetries()+" retries failed"));