Converting EntityHasFieldTest to unit test.