Add resetAdapter() function in test method.