public boolean accept( Job job ) {
return job.getJobName().contains( "testGetJobsJob" );
}
} );
Assert.assertEquals( "The scheduler engine does not know about the job.", 1, engineJobs.size() );
Job engineJob = engineJobs.get( 0 );
//
// Now make sure we have the same job available on the webservice client side
//
Assert.assertEquals( "The scheduler service does not know about the job.", 1, serviceJobs.length );
Job serviceJob = schedulerSvc.getJobs()[0];
Assert.assertEquals( "jobName is wrong", engineJob.getJobName(), serviceJob.getJobName() );
Map<String, Serializable> params = serviceJob.getJobParams();
Assert.assertTrue( "string job parameter is wrong", "testStringValue".equals( params.get( "stringParam" ) ) );
Assert.assertTrue( "list job parameter is missing", params.containsKey( "listParam" ) );
Assert.assertTrue( "map job parameter is missing", params.containsKey( "mapParam" ) );