Models in Memory Testing, From functional testing to defect-based testing