com.automation.remarks.junit5.VideoExtension.videoDisabled(...) will never return true if no Video Annotation is set:
private boolean videoDisabled(Method testMethod) {
Optional<com.automation.remarks.video.annotations.Video> video = AnnotationUtils.findAnnotation(testMethod, com.automation.remarks.video.annotations.Video.class);
return video.map(v -> !videoEnabled(v))
.orElseGet(() -> true);
//return !video.isPresent() && !videoEnabled(video.get());
}
video.map will always return false if video is not given (javadoc of map: the mapping function to apply to a value, if present). So videoEnabled is never called without an annotation.