JobMutexGroups { public Set<JobMutexGroup> getMutexGroups() { return mutexGroups; }  Set<JobMutexGroup> getMutexGroups(); Set<String> mutexJobTypesFor(final String jobType); @Autowired(required = false) JobMutexGroups setMutexGroups(Set<JobMutexGroup> mutexGroups);  }
@Test public void shouldAutowireMultipleMutexGroups() { try (final AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext()) { context.register(TestMutexGroupConfiguration.class); context.register(JobMutexGroups.class); context.refresh(); final JobMutexGroups jobMutexGroups = context.getBean("jobMutexGroups", JobMutexGroups.class); assertThat(jobMutexGroups.getMutexGroups(), hasSize(2)); } }