/** add throws NPE if offer does */ public void testAddNPE() { Succeed q = new Succeed(); try { q.add(null); shouldThrow(); } catch (NullPointerException success) { } }
/** add returns true if offer succeeds */ public void testAddS() { Succeed q = new Succeed(); assertTrue(q.add(two)); }