refactor test bootstrap