fix failed test by refactoring
refactoring of sample project