AsynchronousJobPool implements ContextResolver<AsynchronousJobPool> { public String getAsynchronousServicePath() { return asynchronousServicePath; } AsynchronousJobPool(EverrestConfiguration config); String getAsynchronousServicePath(); int getMaxCacheSize(); int getMaxQueueSize(); int getThreadPoolSize(); int getJobTimeout(); @Override AsynchronousJobPool getContext(Class<?> type); final AsynchronousJob addJob(Object resource, ResourceMethodDescriptor resourceMethod, Object[] params); AsynchronousJob getJob(Long jobId); AsynchronousJob removeJob(Long jobId); List<AsynchronousJob> getAll(); boolean registerListener(AsynchronousJobListener listener); boolean unregisterListener(AsynchronousJobListener listener); @PreDestroy void stop();  }
@Test public void readsServicePathFromConfiguration() throws Exception { final EverrestConfiguration configuration = new EverrestConfiguration(); configuration.setAsynchronousServicePath("/async/bla/bla"); asynchronousJobPool = new AsynchronousJobPool(configuration); assertEquals("/async/bla/bla", asynchronousJobPool.getAsynchronousServicePath()); }