@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));
    }
}