### Question:
ReflectionUtils { public static Set<Class<?>> findAllClassesWithAnnotation( String packagePrefix, Class<? extends Annotation> annotation) { Objects.requireNonNull(packagePrefix); Objects.requireNonNull(annotation); Reflections reflections = new Reflections(packagePrefix); return reflections.getTypesAnnotatedWith(annotation); } private  ReflectionUtils(); static Set<Method> findAllMethodsWithAnnotation(Class<?> clazz,
            Class<? extends Annotation> annotation); static Set<Class<?>> findAllClassesWithAnnotation(
            String packagePrefix,
            Class<? extends Annotation> annotation); static Set<Class<?>> findAllClassesWithAnnotation(
            String packagePrefix,
            Class<? extends Annotation> annotation,
            Predicate<Class<?>> matchCondition); static void fieldSetAsBoolean(Field field, Object targetObject, String value); static void fieldSetAsString(Field field, Object targetObject, String value); static void fieldSetAsInteger(Field field, Object targetObject, String value);  }### Answer:
@Test public void testFindAllClassesWithAnnotation() throws Exception { Set<Class<?>> classes = ReflectionUtils.findAllClassesWithAnnotation( ReflectionUtilsTest.class.getPackage().getName(), TestAnnotaion.class); assertTrue(classes.contains(TestAnnotatedClass.class)); }
@Test public void testFindAllClassesWithAnnotationWithCondition() throws Exception { Set<Class<?>> classes = ReflectionUtils.findAllClassesWithAnnotation( ReflectionUtilsTest.class.getPackage().getName(), TestAnnotaion.class, c -> c.getAnnotation(TestAnnotaion.class).value() == Types.T1); assertTrue(classes.contains(TestAnnotatedClass.class)); }