@Test public void test() throws Exception { Main.main(null); }
public static void main(String[] args) throws Exception { try (Consumer consumer = new Consumer(); Producer producer = new Producer()) { consumer.consume(); producer.produce(); Thread.sleep(1000); } }
Main { public static void main(String[] args) throws Exception { try (Consumer consumer = new Consumer(); Producer producer = new Producer()) { consumer.consume(); producer.produce(); Thread.sleep(1000); } } }
Main { public static void main(String[] args) throws Exception { try (Consumer consumer = new Consumer(); Producer producer = new Producer()) { consumer.consume(); producer.produce(); Thread.sleep(1000); } }  }
Main { public static void main(String[] args) throws Exception { try (Consumer consumer = new Consumer(); Producer producer = new Producer()) { consumer.consume(); producer.produce(); Thread.sleep(1000); } }  static void main(String[] args); }
Main { public static void main(String[] args) throws Exception { try (Consumer consumer = new Consumer(); Producer producer = new Producer()) { consumer.consume(); producer.produce(); Thread.sleep(1000); } }  static void main(String[] args);  }