### Question:
Main { public static void main(String[] args) { applicationContext = new AnnotationConfigApplicationContext(BlackjackCoreConfig.class); applicationContext.registerShutdownHook(); System.out.println("Blackjack started"); }  static void main(String[] args); static AnnotationConfigApplicationContext applicationContext; }### Answer:
@Test public void test() throws InterruptedException { String[] args = new String[] {}; Main.main(args); CometDClient cometDClient = new CometDClient("http: cometDClient.handshake(); cometDClient.subscribeToChannel("/table/1/player/1", new LoggingListener()); cometDClient.subscribeToChannel("/table/1", new LoggingListener()); ProducerTemplate producerTemplate = Main.applicationContext.getBean(ProducerTemplate.class); producerTemplate.asyncSendBody("cometd: producerTemplate.asyncSendBody("cometd: Thread.sleep(1000); System.err.println("Na what?"); }