package Ġcom . t ng tech . j given . scenario . state Ċ Ċ import Ġcom . intellij . psi . Psi Element Ċ import Ġcom . intellij . psi . Psi Field Ċ import Ġcom . intellij . psi . Psi Modifier List Owner Ċ import Ġcom . t ng tech . j given . Annotations Ċ import Ġcom . t ng tech . j given . util . Annotation Provider Ċ Ċ class ĠScenario State Annotation Provider ( ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġannotation Provider : ĠAnnotation Provider Ġ= ĠAnnotation Provider () Ċ ) Ġ{ ĊĊĠĠĠ Ġfun Ġis J Given Scenario State ( psi Element : ĠPsi Element ?) Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpsi Element Ġ!= Ġnull Ġ&& Ġis Field Annotated With Any Of ( psi Element , ĠAn notations . J G IV EN _ SC EN ARIO _ STATE _ CLASS _ NAMES ) ĊĊĠĠĠ Ġprivate Ġfun Ġis Field Annotated With Any Of ( psi Element : ĠPsi Element , ĠclassNames : ĠCollection < String >) Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpsi Element Ġis ĠPsi Field Ġ&& Ġannotation Provider . find Annotation ( psi Element Ġas ĠPsi Modifier List Owner , ĠclassNames ) Ġ!= Ġnull ĊĊĠĠĠ Ġfun Ġis Provided Scenario State ( psi Element : ĠPsi Element ) Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġis Field Annotated With Any Of ( psi Element , ĠAn notations . PROVIDED _ SC EN ARIO _ STATE _ CLASS _ NAMES ) ĊĊĠĠĠ Ġfun Ġis Expected Scenario State ( psi Element : ĠPsi Element ) Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġis Field Annotated With Any Of ( psi Element , ĠAn notations . EXPECTED _ SC EN ARIO _ STATE _ CLASS _ NAMES ) ĊĊĠĠĠ Ġfun Ġget J Given Annotation On ( field : ĠPsi Field ) Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġannotation Provider . find Annotation ( field , ĠAn notations . J G IV EN _ SC EN ARIO _ STATE _ CLASS _ NAMES ) Ċ } Ċ