create test version of function createRecord()