@Test public void shouldMutuallyExcludeOthers() { final JobMutexGroups mutexGroups = new JobMutexGroups(); mutexGroups.setMutexGroups(hashSet( new JobMutexGroup("first", "foo", "foo1", "foo2"), new JobMutexGroup("second", "bar", "bar1", "foo1") )); assertThat(mutexGroups.mutexJobTypesFor("foo1"), containsInAnyOrder("foo", "foo2", "bar", "bar1"));; } }