* Tests {@link GerritTrigger#gerritSlavesToWaitFor(String)}. It should
* return empty slave list when not configured.
*/
@Test
public void shouldReturnEmptySlaveListWhenNotConfigured() {
IGerritHudsonTriggerConfig configMock = setupSeverConfigMock();
GerritTrigger gerritTrigger = Setup.createDefaultTrigger(null);
// Replication config not defined
List<GerritSlave> slaves = gerritTrigger.gerritSlavesToWaitFor(PluginImpl.DEFAULT_SERVER_NAME);
assertNotNull(slaves);
assertEquals(0, slaves.size());
// ReplicationConfig is defined but is not configured
ReplicationConfig replicationConfigMock = mock(ReplicationConfig.class);
when(configMock.getReplicationConfig()).thenReturn(replicationConfigMock);
slaves = gerritTrigger.gerritSlavesToWaitFor(PluginImpl.DEFAULT_SERVER_NAME);
assertNotNull(slaves);
assertEquals(0, slaves.size());
}