Queue implementation using tdd