*/
protected void assertRecovery(int invoked, String[] actions) throws Exception {
// Process is still active, none of the completed states.
assertNotNull(lastInstance(TInstanceStatus.ACTIVE));
// Tests here will only generate one failure.
TInstanceInfo instance = lastInstance(null);
int count = 30;
int sleep = 0;
while (true) {
count--;
if (count <= 0) throw new AssertionError("No failures info, which are required");
Thread.sleep(sleep);
sleep = 1000;
TFailuresInfo failures = instance.getFailures();
if (!(failures != null && failures.getCount() == 1)) continue;
ProcessInfoDocument m = _management.getProcessInfo(_processId);
if (!m.getProcessInfo().isSetInstanceSummary()) continue;
failures = m.getProcessInfo().getInstanceSummary().getFailures();
if (!(failures != null && failures.getCount() == 1)) continue;