Refactor some test and add dataProvider