// Path: virtual_screen/src/main/java/nl/crowndov/displaydirect/virtual_screen/Main.java
// public class Main {
// 
//     private static final Logger LOGGER = LoggerFactory.getLogger(Main.class);
// 
//     public static void main(String[] args) {
//         run(new Configuration());
//     }
// 
//     public static void run(Configuration configuration) {
//         DisplayDirectClient c = new DisplayDirectClient(configuration);
//         c.setListener(new Listener());
//         c.start();
// 
//         while (!Thread.interrupted()) {
//             try {
//                 Thread.sleep(1000);
//             } catch (InterruptedException e) {
//                 c.stop();
//                 break;
//             }
//         }
//     }
// 
//     private static class Listener implements OnDisplayDirectListener {
// 
//         @Override
//         public void onScreenContentsChange(List<PassTime> times) {
//             String display = times.stream()
//                     .map(PassTime::toString)
//                     .collect(Collectors.joining("\r\n"));
//             System.out.println(display+"\r\n=============");
//         }
// 
//         @Override
//         public void onSubscriptionResponse(DisplayDirectMessage.SubscriptionResponse response) {
//             LOGGER.info("Got subscription status response of '{}' with status '{}'", response.getSuccess(), response.getStatus());
//         }
// 
//         @Override
//         public void onMessage(DisplayDirectMessage.Container value) {
// 
//         }
//     }
// }


import nl.crowndov.displaydirect.virtual_screen.Main;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.stream.IntStream;
package nl.crowndov.displaydirect.virtual_screen.test;



/**
 * Copyright 2017 CROW-NDOV
 *
 * This file is subject to the terms and conditions defined in file 'LICENSE.txt', which is part of this source code package.
 */
public class TestMain {

    private static final Logger LOGGER = LoggerFactory.getLogger(TestMain.class);
    private static final int NUMBER = 500
            ;

    public static void main(String[] args) throws InterruptedException {
        Executor exec = Executors.newFixedThreadPool(NUMBER);
        IntStream.range(0, NUMBER).forEach(i -> {
// Path: virtual_screen/src/main/java/nl/crowndov/displaydirect/virtual_screen/Main.java
// public class Main {
// 
//     private static final Logger LOGGER = LoggerFactory.getLogger(Main.class);
// 
//     public static void main(String[] args) {
//         run(new Configuration());
//     }
// 
//     public static void run(Configuration configuration) {
//         DisplayDirectClient c = new DisplayDirectClient(configuration);
//         c.setListener(new Listener());
//         c.start();
// 
//         while (!Thread.interrupted()) {
//             try {
//                 Thread.sleep(1000);
//             } catch (InterruptedException e) {
//                 c.stop();
//                 break;
//             }
//         }
//     }
// 
//     private static class Listener implements OnDisplayDirectListener {
// 
//         @Override
//         public void onScreenContentsChange(List<PassTime> times) {
//             String display = times.stream()
//                     .map(PassTime::toString)
//                     .collect(Collectors.joining("\r\n"));
//             System.out.println(display+"\r\n=============");
//         }
// 
//         @Override
//         public void onSubscriptionResponse(DisplayDirectMessage.SubscriptionResponse response) {
//             LOGGER.info("Got subscription status response of '{}' with status '{}'", response.getSuccess(), response.getStatus());
//         }
// 
//         @Override
//         public void onMessage(DisplayDirectMessage.Container value) {
// 
//         }
//     }
// }


// Path: virtual_screen/src/main/java/nl/crowndov/displaydirect/virtual_screen/test/TestMain.java
import nl.crowndov.displaydirect.virtual_screen.Main;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.stream.IntStream;

package nl.crowndov.displaydirect.virtual_screen.test;



/**
 * Copyright 2017 CROW-NDOV
 *
 * This file is subject to the terms and conditions defined in file 'LICENSE.txt', which is part of this source code package.
 */
public class TestMain {

    private static final Logger LOGGER = LoggerFactory.getLogger(TestMain.class);
    private static final int NUMBER = 500
            ;

    public static void main(String[] args) throws InterruptedException {
        Executor exec = Executors.newFixedThreadPool(NUMBER);
        IntStream.range(0, NUMBER).forEach(i -> {
                exec.execute(() -> Main.run(new TestConfiguration()));