### Question:
Types { public static Set<? extends Annotation> getFieldJsonQualifierAnnotations( Class<?> clazz, String fieldName) { try { Field field = clazz.getDeclaredField(fieldName); field.setAccessible(true); Annotation[] fieldAnnotations = field.getDeclaredAnnotations(); Set<Annotation> annotations = new LinkedHashSet<>(fieldAnnotations.length); for (Annotation annotation : fieldAnnotations) { if (annotation.annotationType().isAnnotationPresent(JsonQualifier.class)) { annotations.add(annotation); } } return Collections.unmodifiableSet(annotations); } catch (NoSuchFieldException e) { throw new IllegalArgumentException( "Could not access field " + fieldName + " on class " + clazz.getCanonicalName(), e); } } private  Types(); static String generatedJsonAdapterName(Class<?> clazz); static String generatedJsonAdapterName(String className); static @Nullable Set<? extends Annotation> nextAnnotations(
      Set<? extends Annotation> annotations, Class<? extends Annotation> jsonQualifier); static ParameterizedType newParameterizedType(Type rawType, Type... typeArguments); static ParameterizedType newParameterizedTypeWithOwner(
      Type ownerType, Type rawType, Type... typeArguments); static GenericArrayType arrayOf(Type componentType); static WildcardType subtypeOf(Type bound); static WildcardType supertypeOf(Type bound); static Class<?> getRawType(Type type); static Type collectionElementType(Type context, Class<?> contextRawType); static boolean equals(@Nullable Type a, @Nullable Type b); static Set<? extends Annotation> getFieldJsonQualifierAnnotations(
      Class<?> clazz, String fieldName);  }### Answer:
@Test public void getFieldJsonQualifierAnnotations_privateFieldTest() { Set<? extends Annotation> annotations = Types.getFieldJsonQualifierAnnotations(ClassWithAnnotatedFields.class, "privateField"); assertThat(annotations).hasSize(1); assertThat(annotations.iterator().next()).isInstanceOf(FieldAnnotation.class); }
@Test public void getFieldJsonQualifierAnnotations_publicFieldTest() { Set<? extends Annotation> annotations = Types.getFieldJsonQualifierAnnotations(ClassWithAnnotatedFields.class, "publicField"); assertThat(annotations).hasSize(1); assertThat(annotations.iterator().next()).isInstanceOf(FieldAnnotation.class); }
@Test public void getFieldJsonQualifierAnnotations_unannotatedTest() { Set<? extends Annotation> annotations = Types.getFieldJsonQualifierAnnotations(ClassWithAnnotatedFields.class, "unannotatedField"); assertThat(annotations).hasSize(0); }