@Test public void shouldThrowExceptionForCapacityThatIsNotPowerOfTwo() { final int capacity = 777; final int totalBufferLength = capacity + BroadcastBufferDescriptor.TRAILER_LENGTH; when(buffer.capacity()).thenReturn(totalBufferLength); assertThrows(IllegalStateException.class, () -> new BroadcastTransmitter(buffer)); }
public int capacity() { return capacity; }
BroadcastTransmitter { public int capacity() { return capacity; } }
BroadcastTransmitter { public int capacity() { return capacity; } BroadcastTransmitter(final AtomicBuffer buffer); }
BroadcastTransmitter { public int capacity() { return capacity; } BroadcastTransmitter(final AtomicBuffer buffer); int capacity(); int maxMsgLength(); void transmit(final int msgTypeId, final DirectBuffer srcBuffer, final int srcIndex, final int length); }
BroadcastTransmitter { public int capacity() { return capacity; } BroadcastTransmitter(final AtomicBuffer buffer); int capacity(); int maxMsgLength(); void transmit(final int msgTypeId, final DirectBuffer srcBuffer, final int srcIndex, final int length);  }