private void throwIfNotSameType(final Field field, final Class clazz) {
    if (!field.getType().equals(clazz) && // non-array
        !field.getType().getComponentType().equals(clazz)) { // array
      throw new IllegalArgumentException(
          "Field " + field.getName() + " is not same type as " + clazz.getName());
    }
  }
Note: Overriding MethodRule is only way to get {@code Object target}
geode-core/src/distributedTest/java/org/apache/geode/management/ManagementTestRule.java