I’ve just finished writing a simple Blocking Queue with semaphores, and i'd to test its synchronization. 

I've tested my implementation stability on a large number of threads which are inserting and removing from the Queue,

I'd like to get some help with some ideas\tests about how to test it in a more corrected way.

```
public class BBQ<T> {
private ArrayList<T> tasks;
private Semaphore mutex;
private Semaphore full;
private Semaphore zero;

public BBQ(int numofWorkers){
    tasks = new ArrayList<T>();
    mutex = new Semaphore(1, true);
    full = new Semaphore(numofWorkers, true);
    zero = new Semaphore(0, true);
}

public boolean add(T item) {
    boolean ans = false;

    try {
        zero.acquire();
        mutex.acquire();
        ans = tasks.add(item);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    finally{
        mutex.release();
        full.release();

    }
    return ans;
}

public boolean remove() {
    boolean ans = false;
    try {
        full.acquire();
        mutex.acquire();
        if (tasks.remove(0) == null) {
            ans = false;
        }
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    finally{
        mutex.release();
        zero.release();
    }
    return ans;
}

public int size() {
    return tasks.size();
}

public String toString() {
    return tasks.toString();
}

```