
  public static void main(String[] args) throws InterruptedException {
    Auction2 auction = new Auction2();
    Thread auctionThread = new Thread(new Runnable() {
      @Override
      public void run() {
        try{
          auction.auction(2000);
        } catch(InterruptedException ie) {
          System.out.println("auction.auction() interrupted !");
          return;
        }
        throw new AssertionError();
      }
    });
    Thread bidThread = new Thread(new Runnable() {
      @Override
      public void run() {
        try{
          auction.bid(666);
        } catch(InterruptedException ie) {
          System.out.println("auction.bid() interrupted !");
          return;
        }
        throw new AssertionError();
      }
    });
    auctionThread.start();
    bidThread.start();
    Thread.sleep(500);
    bidThread.interrupt();               // test if bidThread is interrupted first
    //auctionThread.interrupt();         // test if auctionThread is interrupted first
  }