Try this public static testMethod void testTrigger() { Area__c ar = new Area__c(Name = 'CA'); insert ar; Case caseObj = new Case(CountryWebFormText__c ='CA', Newsletter__c = TRUE); insert caseObj; System.debug(caseObj); caseObj=[Select id,countryWebFormText__c,Country_of_Origin__r.name from Case where id=:caseObj.id limit 1]; System.assertEquals(caseObj.CountryWebFormText__c, caseObj.Country_of_Origin__r.name); } From what we know is Country_of_Origin__C is a lookup field of type Area__C . caseObj.Country_of_Origin__c will only contain the ID of Area__C record, while what you want is the name of Area__C record. So to get the Name you have to query it as Country_of_Origin__R.name get the name of inserted Area. As commented , seeAllData as true is generally not recommended.