* Find the first field in the class annotated with the <b>Managed</b> annotation.
*/
public static Optional<PagesAnnotatedField> findOptionalAnnotatedField(final Class<?> testClass) {
for (Field field : Fields.of(testClass).allFields()) {
ManagedPages fieldAnnotation = annotationFrom(field);
if (fieldAnnotation != null) {
return Optional.of(new PagesAnnotatedField(field, fieldAnnotation));
}
}
return Optional.absent();