Below is the code which sometimes work and sometimes not. It skips the immediate next event.
IntermediateCatchEvent event = new IntermediateCatchEvent();
event.setId(component.getUid());
event.setName(component.getName());
TimerEventDefinition ed = new TimerEventDefinition();
ed.setTimeDuration(((TimerWait) component).getWaitDuration());
event.addEventDefinition(ed);
components.add(event);