try {
field = where.getDeclaredField(fieldName);
field.setAccessible(true);
return (T) field.get(object);
} catch (NoSuchFieldException e) {
throw new FieldNotFoundException("Field '" + fieldName + "' was not found in class " + where.getName()
+ ".");
} catch (Exception e) {
throw new RuntimeException("Internal error: Failed to get field in method getInternalState.", e);
}
}