refactor queue test