code: public static void setInternalState(Object object, String fieldName, Object value, Class<?> where) {
          if (object == null || fieldName == null || fieldName.equals("") || fieldName.startsWith(" ")) {
              throw new IllegalArgumentException("object, field name, and \"where\" must not be empty or null.");
          }
  
          final Field field = getField(fieldName, where);
          try {
              field.set(object, value);
          } catch (Exception e) {
              throw new RuntimeException("Internal Error: Failed to set field in method setInternalState.", e);
          }
      }
docs: Set the value of a field using reflection. Use this method when you need
  to specify in which class the field is declared. This is useful if you
  have two fields in a class hierarchy that has the same name but you like
  to modify the latter.
  
  @param object    the object to modify
  @param fieldName the name of the field
  @param value     the new value of the field
  @param where     which class the field is defined