Add GetFieldValue helper function and additional unit tests