### Question:
NullableUtils { public static boolean isNullable(CtField field) { try { for (Object annotation : field.getAnnotations()) { Class annotationClass = Annotation.class; Method method = annotationClass.getMethod("annotationType"); Class type = (Class) method.invoke(annotation); if ("Nullable".equals(type.getSimpleName())) return true; } } catch (Exception e) { throw new RuntimeException(e); } return false; } private  NullableUtils(); static boolean isNotNullable(CtField field); static boolean isNullable(CtField field);  }### Answer:
@Test public void testIsNullable() throws NotFoundException { CtClass clazz = ClassPool.getDefault().get(TestClassWithAnnotatedFields.class.getName()); CtField fieldA = clazz.getField("a"); assertThat(NullableUtils.isNullable(fieldA), is(true)); }