Implemented the testQueue method inside the SynchronizedQueue class