JobManager { @GET @Path( "{job_id}/schedule" ) @Produces( TEXT_PLAIN ) public Response schedule( @PathParam( "job_id" ) final String jobId, @DefaultValue( "true" ) @QueryParam( "confirm" ) final boolean confirm ) { try { ExecutionContext context = getContext( jobId ); if ( confirm ) { if ( context.needRecalculation( Boolean.FALSE ) ) { final UUID recalculate = context.recalculate(); if ( null != recalculate ) { context = getContext( recalculate.toString() ); } } context.schedule(); } else { context.preSchedule(); } return Response.ok().build(); } catch ( final ContextFailedException e ) { return get404(); } } JobManager();  JobManager( final boolean isSupportAsync, final long pollingIntervalMilliseconds,
                     final long dialogThresholdMillisecond );  JobManager( final boolean isSupportAsync, final long pollingIntervalMilliseconds,
                     final long dialogThresholdMillisecond, final boolean promptForLocation ); @GET @Path( "config" ) @Produces( APPLICATION_JSON ) Response getConfig(); @GET @Path( "{job_id}/content" ) Response getPDFContent( @PathParam( "job_id" ) final String job_id ); @SuppressWarnings( "unchecked" ) @POST @Path( "{job_id}/content" ) Response getContent( @PathParam( "job_id" ) final String jobId ); @GET @Path( "{job_id}/status" ) @Produces( APPLICATION_JSON ) Response getStatus( @PathParam( "job_id" ) final String jobId ); @SuppressWarnings( "unchecked" ) @GET @Path( "{job_id}/cancel" ) Response cancel( @PathParam( "job_id" ) final String jobId ); @GET @Path( "{job_id}/requestPage/{page}" ) @Produces( TEXT_PLAIN ) Response requestPage( @PathParam( "job_id" ) final String jobId, @PathParam( "page" ) final int page ); @GET @Path( "{job_id}/schedule" ) @Produces( TEXT_PLAIN ) Response schedule( @PathParam( "job_id" ) final String jobId, @DefaultValue( "true" )
                            @QueryParam( "confirm" ) final boolean confirm ); @POST @Path( "{job_id}/schedule" ) @Produces( APPLICATION_JSON ) Response confirmSchedule( @PathParam( "job_id" ) final String jobId,
                                   @DefaultValue( "true" )
                                   @QueryParam( "confirm" ) final boolean confirm,
                                   @DefaultValue( "false" )
                                   @QueryParam( "recalculateFinished" ) final boolean recalculateFinished,
                                   @QueryParam( "folderId" ) final String folderId,
                                   @QueryParam( "newName" ) final String newName ); ExecutionContext getContext( final String jobId ); @POST @Path( "reserveId" ) @Produces( APPLICATION_JSON ) Response reserveId();  }
@Test public void testSchedule() throws IOException { final JobManager jobManager = new JobManager(); final Response response = jobManager.schedule( uuid.toString(), true ); assertNotNull( response ); assertEquals( 200, response.getStatus() ); }