Sample Code:
@isTest() public class TestUtils { private static testmethod void CreateAccount(){ //Get Account Record Type Id Id accountRecordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByName().get('DeveloperNameOfRecordType').getRecordTypeId(); //Create Account Account acc = new Account(); acc.Name ='Test Account'; acc.Industry = 'Retail'; acc.AccountNumber = '123456'; acc.RecordTypeId = accountRecordTypeId; Insert acc; } }