### Question:
ReflectionHelper { public static Set<Method> getterMethods(Class<?> clazz) { Preconditions.checkNotNull(clazz); try { ImmutableSet.Builder<Method> builder = ImmutableSet.builder(); BeanInfo info = Introspector.getBeanInfo(clazz); for (PropertyDescriptor p : info.getPropertyDescriptors()) { Method getter = p.getReadMethod(); if (getter != null) { if (!getter.getDeclaringClass().equals(Object.class)) { builder.add(getter); } } } return builder.build(); } catch (IntrospectionException e) { throw new IllegalStateException("Could not introspect on " + clazz, e); } }  static boolean hasAnnotation(Method method, Class<A> annotationType); @Nullable static A findAnnotation(Method method, Class<A> annotationType); @Nullable static A findAnnotation(Class<?> clazz, Class<A> annotationType); @Nullable static Object invokeMethod(Method method, Object target); static Set<Method> getterMethods(Class<?> clazz); static String propertyNameOfGetter(Method method); @Nullable static T propertyValueByName(Object targetObject, String propertyName, Class<T> clazz); @Nullable static Method propertyGetter(Object obj, String propertyName);  }### Answer:
@Test public void testGetterMethods() { assertEquals(Sets.newHashSet(parentAgetInt, parentAgetInt2, childAgetVar, childAisVar2), ReflectionHelper.getterMethods(childA)); assertEquals(2, ReflectionHelper.getterMethods(childB).size()); }