diff --git a/sfdx-source/apex-common/test/classes/fflib_SObjectUnitOfWorkTest.cls b/sfdx-source/apex-common/test/classes/fflib_SObjectUnitOfWorkTest.cls index 2eb8775630..e4f8ab2c05 100644 --- a/sfdx-source/apex-common/test/classes/fflib_SObjectUnitOfWorkTest.cls +++ b/sfdx-source/apex-common/test/classes/fflib_SObjectUnitOfWorkTest.cls @@ -882,7 +882,10 @@ private with sharing class fflib_SObjectUnitOfWorkTest public void dmlInsert(List objList) { for (SObject obj : objList) { - obj.Id = fflib_IDGenerator.generate(obj?.getSObjectType()); + if (obj == null) { + continue; + } + obj.Id = fflib_IDGenerator.generate(obj.getSObjectType()); } this.recordsForInsert.addAll(objList); }