class CircularQueue {

    public void put(Object item) {
        precondition(item != null, "put() null item");
        precondition(!full(),
                "put() into full CircularQueue");
        assert invariant();
        data[in++] = item;
        if (in >= data.length) {
            in = 0;
            wrapped = true;
        }
        assert invariant();
    }

}

class CircularQueueTest {

    private CircularQueue queue;
    private int i;

    @Test
    public void nullPut() {

        System.out.println("testNullPut");
        String msg = "";
        try {
            queue.put(null);
        } catch (CircularQueueException e) {
            msg = e.getMessage();
            System.out.println(msg);
        }
        assertEquals(msg, "put() null item");
    }

}