@Test public void shouldThrowExceptionForCapacityThatIsNotPowerOfTwo() { final int capacity = 777; final int totalBufferLength = capacity + BroadcastBufferDescriptor.TRAILER_LENGTH; when(buffer.capacity()).thenReturn(totalBufferLength); assertThrows(IllegalStateException.class, () -> new BroadcastReceiver(buffer)); }
public int capacity() { return capacity; }
BroadcastReceiver { public int capacity() { return capacity; } }
BroadcastReceiver { public int capacity() { return capacity; } BroadcastReceiver(final AtomicBuffer buffer); }
BroadcastReceiver { public int capacity() { return capacity; } BroadcastReceiver(final AtomicBuffer buffer); int capacity(); long lappedCount(); int typeId(); int offset(); int length(); MutableDirectBuffer buffer(); boolean receiveNext(); boolean validate(); }
BroadcastReceiver { public int capacity() { return capacity; } BroadcastReceiver(final AtomicBuffer buffer); int capacity(); long lappedCount(); int typeId(); int offset(); int length(); MutableDirectBuffer buffer(); boolean receiveNext(); boolean validate();  }