@Test public void respondSlowlyThanTimeout() throws IOException { stubFor(get("/api/foobar") .willReturn(aResponse() .withStatus(200) .withFixedDelay(5000))); Operator op = factory.newOperator(newContext( tempPath, newTaskRequest().withConfig(config))); try { op.run(); fail("should be thrown Exception."); } catch (TaskExecutionException ignore) { } }
@Override public Operator newOperator(OperatorContext context) { return new HttpOperator(context); }
HttpOperatorFactory implements OperatorFactory { @Override public Operator newOperator(OperatorContext context) { return new HttpOperator(context); } }
HttpOperatorFactory implements OperatorFactory { @Override public Operator newOperator(OperatorContext context) { return new HttpOperator(context); } @Inject  HttpOperatorFactory(Config systemConfig, @Environment Map<String, String> env); }
HttpOperatorFactory implements OperatorFactory { @Override public Operator newOperator(OperatorContext context) { return new HttpOperator(context); } @Inject  HttpOperatorFactory(Config systemConfig, @Environment Map<String, String> env); @Override String getType(); @Override Operator newOperator(OperatorContext context); }
HttpOperatorFactory implements OperatorFactory { @Override public Operator newOperator(OperatorContext context) { return new HttpOperator(context); } @Inject  HttpOperatorFactory(Config systemConfig, @Environment Map<String, String> env); @Override String getType(); @Override Operator newOperator(OperatorContext context);  }