### Question:
CTSQueueConfiguration implements QueueConfiguration { public static int findPowerOfTwo(int value) { for (int ii = value; ii > 0; ii--) { if (isPowerOfTwo(ii)) { return ii; } } throw new IllegalArgumentException("No power of two found."); } @Inject  CTSQueueConfiguration(ConnectionConfigFactory dataLayerConfig,
            @Named(CoreTokenConstants.CTS_ASYNC_DEBUG) Debug debug); @Override int getQueueTimeout(); @Override int getQueueSize(); @Override int getProcessors(); static int findPowerOfTwo(int value); static final int DEFAULT_TIMEOUT; static final int DEFAULT_QUEUE_SIZE; }### Answer:
@Test public void shouldFindPowerOfTwo() { int value = 64; assertThat(CTSQueueConfiguration.findPowerOfTwo(value)).isEqualTo(value); }
@Test public void shouldFindPowerOfTwoLessThanStartingValue() { int value = 20; assertThat(CTSQueueConfiguration.findPowerOfTwo(value)).isEqualTo(16); }