InputSumExample { public static <ResourcePoolT extends ResourcePool> void main(String[] args) throws IOException { CmdLineUtil<ResourcePoolT, ProtocolBuilderNumeric> util = new CmdLineUtil<>(); util.parse(args); ProtocolSuite<ResourcePoolT, ProtocolBuilderNumeric> psConf = util.getProtocolSuite(); SecureComputationEngine<ResourcePoolT, ProtocolBuilderNumeric> sce = new SecureComputationEngineImpl<>(psConf, util.getEvaluator()); ResourcePoolT resourcePool = util.getResourcePool(); new InputSumExample().runApplication(sce, resourcePool, util.getNetwork()); util.closeNetwork(); sce.shutdownSCE(); } InputSumExample(); void runApplication(
      SecureComputationEngine<ResourcePoolT, ProtocolBuilderNumeric> sce,
      ResourcePoolT resourcePool, Network network); static void main(String[] args);  }
@Test public void testInputCmdLine() throws Exception { Runnable p1 = () -> { try { InputSumExample.main( new String[]{"-i", "1", "-p", "1:localhost:8081", "-p", "2:localhost:8082", "-s", "dummyArithmetic"}); } catch (IOException e) { System.exit(-1); } }; Runnable p2 = () -> { try { InputSumExample.main( new String[]{"-i", "2", "-p", "1:localhost:8081", "-p", "2:localhost:8082", "-s", "dummyArithmetic"}); } catch (IOException e) { System.exit(-1); } }; Thread t1 = new Thread(p1); Thread t2 = new Thread(p2); t1.start(); t2.start(); t1.join(); t2.join(); }