### Question:
JavassistUtils { public static boolean isFragment(CtClass clazz) throws NotFoundException { return isSubClass(clazz.getClassPool(), clazz, Fragment.class); } private  JavassistUtils(); static boolean isArrayOf(CtField field, CtClass typeOfArrayElements); static boolean isArrayOf(CtField field, ClassPool classPool, Class<?> superClass); static boolean isBooleanArray(CtField field); static boolean isByteArray(CtField field); static boolean isCharArray(CtField field); static boolean isDoubleArray(CtField field); static boolean isFloatArray(CtField field); static boolean isIntArray(CtField field); static boolean isLongArray(CtField field); static boolean isShortArray(CtField field); static boolean isCharSequenceArray(CtField field, ClassPool classPool); static boolean isStringArray(CtField field, ClassPool classPool); static boolean isArrayList(CtField field, ClassPool classPool); static boolean isParcelableArray(CtField field, ClassPool classPool); static boolean isSerializableArray(CtField field, ClassPool classPool); static boolean isActivity(CtClass clazz); static boolean isService(CtClass clazz); static boolean isContext(CtClass clazz); static boolean isBroadCastReceiver(CtClass clazz); static boolean isContentProvider(CtClass clazz); static boolean isApplication(CtClass clazz); static boolean isFragment(CtClass clazz); static boolean isSupportFragment(CtClass clazz); static boolean isView(CtClass clazz); static boolean isSubType(ClassPool classPool, CtClass clazz, Class<?> superClass); static boolean isSubClass(ClassPool classPool, CtClass clazz, Class<?> superClass); static boolean isSubClass(ClassPool classPool, CtClass clazz, String superClassName); static List<CtField> getAllInjectedFieldsForAnnotation(CtClass clazz,
      Class<? extends Annotation> annotationClazz); static List<CtConstructor> extractValidConstructors(final CtClass classToTransform,
      CtClassFilter filter); static int findValidParamIndex(CtClass[] parameterTypes, CtClassFilter filter);  }### Answer:
@Test public void testIsFragment() throws NotFoundException { CtClass clazz = ClassPool.getDefault().get(Fragment.class.getName()); assertThat(JavassistUtils.isFragment(clazz), is(true)); }