public ChangeSetOpIterator advanceStatus(
     String className,
     String methodName,
     String from,
     Function1<IResource, JavaPadDocument> getDocument)
     throws JavaModelException {
   JavaPadDocument doc = getDocument.apply(project.findType(className).getUnderlyingResource());
   String to = STATUSES.get(STATUSES.indexOf(from) + 1);
   return doc.setAnnotation(
       new String[] {PACKAGE, from},
       new String[] {PACKAGE, to},
       className,
       methodName,
       new String[0]);
 }