Optional<PagesAnnotatedField> optionalAnnotatedField = findOptionalAnnotatedField(testClass);
if (optionalAnnotatedField.isPresent()) {
return optionalAnnotatedField.get();
} else {
throw new InvalidManagedPagesFieldException(NO_ANNOTATED_FIELD_ERROR);
}
}