### Question:
ModelUtils { public static boolean isAnnotationNull(Annotation annotation) { if (annotation == null) { return true; } for (Method m : annotation.annotationType().getDeclaredMethods()) { if (m.getParameterCount() == 0) { try { Object value = m.invoke(annotation); if (value.getClass().isArray() && Array.getLength(value) > 0) { return false; } else if (value instanceof Boolean && ((Boolean) value).booleanValue()) { return false; } else if (value instanceof Class && value != Void.class) { return false; } else if (value instanceof Enum && !((Enum<?>) value).name().equalsIgnoreCase("DEFAULT")) { return false; } else if (value instanceof String && !value.toString().isEmpty()) { return false; } else if (value instanceof Annotation && !isAnnotationNull((Annotation) value)) { return false; } } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) { LOGGER.log(WARNING, "Unable to access annotation element.", ex); } } } return true; } private  ModelUtils(); static String normaliseUrl(String path); static HttpMethod getHttpMethod(OpenApiContext context, MethodModel method); static HttpMethod getHttpMethod(String method); static Operation getOrCreateOperation(PathItem pathItem, HttpMethod httpMethod); static Operation findOperation(OpenApiContext context, OpenAPI api, MethodModel method, String path); static void removeOperation(PathItem pathItem, Operation operation); static SchemaType getSchemaType(ParameterizedType type, ApiContext context); static SchemaType getSchemaType(String typeName, ApiContext context); static boolean isMap(String typeName, ApiContext context); static SchemaType getParentSchemaType(SchemaType type1, SchemaType type2); static boolean isRequestBody(ApiContext context, org.glassfish.hk2.classmodel.reflect.Parameter parameter); static In getParameterType(ApiContext context, org.glassfish.hk2.classmodel.reflect.Parameter parameter); static String getParameterName(ApiContext context, org.glassfish.hk2.classmodel.reflect.Parameter parameter); static boolean isAnnotationNull(Annotation annotation); static void extractAnnotations(
            AnnotationModel annotationModel,
            ApiContext context,
            String type,
            String key,
            BiFunction<AnnotationModel, ApiContext, T> factory,
            Map<String, T> wrapper); static void extractAnnotations(
            AnnotationModel annotationModel,
            ApiContext context,
            String type,
            BiFunction<AnnotationModel, ApiContext, T> factory,
            List<T> wrapper); static Boolean mergeProperty(Boolean current, boolean offer, boolean override); static Boolean mergeProperty(boolean current, Boolean offer, boolean override); static Boolean mergeProperty(boolean current, boolean offer, boolean override); static E mergeProperty(E current, E offer, boolean override); static void applyReference(org.eclipse.microprofile.openapi.models.Reference<?> referee, String reference); static void overwrite(T from, T to); @SuppressWarnings("unchecked") static void merge(T from, T to, boolean override); static String getSimpleName(String fqn); static final String UNKNOWN_ELEMENT_NAME; }### Answer:
@Test public void nullAnnoationIsNull() { assertTrue(isAnnotationNull(null)); }
@Test public void emptyAnnotationIsNull() { assertTrue(isAnnotationNull(getFieldAnnotation("nullAnnotation"))); }
@Test public void markerAnnoationIsNull() { assertTrue(isAnnotationNull(getFieldAnnotation("markerAnnoation", MarkerAnnotation.class))); }
@Test public void annotationWithNonEmptyArrayIsNotNull() { assertFalse(isAnnotationNull(getFieldAnnotation("annotationWithArray"))); }
@Test public void annotationWithNonFalseBooleanIsNotNull() { assertFalse(isAnnotationNull(getFieldAnnotation("annotationWithBoolean"))); }
@Test public void annotationWithNonVoidClassIsNotNull() { assertFalse(isAnnotationNull(getFieldAnnotation("annotationWithClass"))); }
@Test public void annotationWithNonDefaultEnumIsNotNull() { assertFalse(isAnnotationNull(getFieldAnnotation("annoationWithEnum"))); }
@Test public void annotationWithNonNullAnnoationIsNotNull() { assertFalse(isAnnotationNull(getFieldAnnotation("annoationWithAnnoation"))); }