List<ScheduledJobMetaData> allJobMetaData = unit.getAttachmentList( ScheduledJobMetaData.ATTACHMENTS_KEY );
assertNotNull( allJobMetaData );
assertEquals( 4, allJobMetaData.size() );
ScheduledJobMetaData jobOne = getJobMetaData( allJobMetaData, "job.one" );
assertNotNull( jobOne );
assertEquals( "job.one", jobOne.getName() );
assertEquals( "My Job is routine", jobOne.getDescription() );
assertEquals( "01 * * * * ?", jobOne.getCronExpression() );
assertEquals( "MyJobClass", jobOne.getRubyClassName() );
assertEquals( "bar", jobOne.getParameters().get( "foo" ) );
assertTrue( jobOne.isSingleton() );
assertNotNull( jobOne.getGroup() );
assertFalse( jobOne.isStopped() );
ScheduledJobMetaData jobTwo = getJobMetaData( allJobMetaData, "job.two" );
assertNotNull( jobTwo );
assertEquals( "job.two", jobTwo.getName() );
assertEquals( "My other Job is extraodinary", jobTwo.getDescription() );
assertEquals( "01 01 01 15 * ?", jobTwo.getCronExpression() );
assertEquals( "MyOtherJobClass", jobTwo.getRubyClassName() );
assertTrue( jobTwo.isSingleton() );
assertNotNull( jobTwo.getGroup() );
assertFalse( jobTwo.isStopped() );
ScheduledJobMetaData jobThree = getJobMetaData( allJobMetaData, "job.three" );
assertNotNull( jobThree );
assertEquals( "job.three", jobThree.getName() );
assertEquals( "My non-singleton job class", jobThree.getDescription() );
assertEquals( "01 01 01 15 * ?", jobThree.getCronExpression() );
assertEquals( "NonSingletonJobClass", jobThree.getRubyClassName() );
assertFalse( jobThree.isSingleton() );
assertNotNull( jobThree.getGroup() );
assertFalse( jobThree.isStopped() );
ScheduledJobMetaData jobFour = getJobMetaData( allJobMetaData, "job.four" );
assertNotNull( jobFour );
assertEquals( "job.four", jobFour.getName() );
assertEquals( "My long running job has timeout", jobFour.getDescription() );
assertEquals( "01 01 01 15 * ?", jobFour.getCronExpression() );
assertEquals( "MyLongRunningJob", jobFour.getRubyClassName() );
assertEquals( new TimeInterval( 5000, TimeUnit.MILLISECONDS ), jobFour.getTimeout() );
assertTrue( jobFour.isSingleton() );
assertNotNull( jobFour.getGroup() );
assertTrue( jobFour.isStopped() );
assertEquals( jobOne.getGroup(), jobTwo.getGroup() );
assertEquals( jobOne.getGroup(), jobThree.getGroup() );
}