public void testNullTimedOffer(){
  SubmissionPublisher<Integer> p=basicPublisher();
  long startTime=System.nanoTime();
  try {
    p.offer(null,LONG_DELAY_MS,MILLISECONDS,null);
    shouldThrow();
  }
 catch (  NullPointerException success) {
  }
  try {
    p.offer(1,LONG_DELAY_MS,null,null);
    shouldThrow();
  }
 catch (  NullPointerException success) {
  }
  assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS / 2);
}

public void testNullTimedOffer ( ) { SubmissionPublisher < Integer > p = basicPublisher ( ) ; long startTime = System . nanoTime ( ) ; try { p . offer ( null , LONG_DELAY_MS , MILLISECONDS , null ) ; shouldThrow ( ) ; } catch ( NullPointerException success ) { } try { p . offer ( 1 , LONG_DELAY_MS , null , null ) ; shouldThrow ( ) ; } catch ( NullPointerException success ) { } assertTrue ( millisElapsedSince ( startTime ) < LONG_DELAY_MS / 2 ) ; }
timed offer with null item or timeunit throws npe
