Fix a test for delegate fire event

When you attach an event at the end of a previous animation, if the
specified previous animated element is not available, the lib thrown
an error. This patch fix this use case.