Unit tests for field by name