assertEquals(9000 + (i % 10), clientBuilder.getSlimPort());
}
}
@Test
public void portStartsAtSlimPortEnvironmentVariable() throws Exception {
Descriptor descriptor = mock(Descriptor.class);
when(descriptor.getVariable("slim.port")).thenReturn("9000");
when(descriptor.getVariable("SLIM_PORT")).thenReturn("1313");
for (int i = 0; i < 15; i++) {
SlimClientBuilder clientBuilder = new SlimClientBuilder(descriptor);
assertEquals(9000 + (i % 10), clientBuilder.getSlimPort());
}
}