@Test
public void testServiceDiscovery() throws InterruptedException, ExecutionException, TimeoutException {
TwillRunner twillRunner = YarnTestUtils.getTwillRunner();
TwillController controller = twillRunner
.prepare(new ServiceApplication())
.addLogHandler(new PrinterLogHandler(new PrintWriter(System.out, true)))
.withArguments("r1", "12345")
.withArguments("r2", "45678")
.start();
ListenableFuture<Service.State> completion = Services.getCompletionFuture(controller);