### Question:
ChannelBuffers { public static int swapMedium(int value) { return value << 16 & 0xff0000 | value & 0xff00 | value >>> 16 & 0xff; } private  ChannelBuffers(); static ChannelBuffer buffer(int capacity); static ChannelBuffer buffer(ByteOrder endianness, int capacity); static ChannelBuffer directBuffer(int capacity); static ChannelBuffer directBuffer(ByteOrder endianness, int capacity); static ChannelBuffer dynamicBuffer(); static ChannelBuffer dynamicBuffer(ChannelBufferFactory factory); static ChannelBuffer dynamicBuffer(int estimatedLength); static ChannelBuffer dynamicBuffer(ByteOrder endianness, int estimatedLength); static ChannelBuffer dynamicBuffer(int estimatedLength, ChannelBufferFactory factory); static ChannelBuffer dynamicBuffer(
            ByteOrder endianness, int estimatedLength, ChannelBufferFactory factory); static ChannelBuffer wrappedBuffer(byte[] array); static ChannelBuffer wrappedBuffer(ByteOrder endianness, byte[] array); static ChannelBuffer wrappedBuffer(byte[] array, int offset, int length); static ChannelBuffer wrappedBuffer(ByteOrder endianness, byte[] array, int offset, int length); static ChannelBuffer wrappedBuffer(ByteBuffer buffer); static ChannelBuffer wrappedBuffer(ChannelBuffer buffer); static ChannelBuffer wrappedBuffer(byte[]... arrays); static ChannelBuffer wrappedBuffer(ByteOrder endianness, byte[]... arrays); static ChannelBuffer wrappedBuffer(ChannelBuffer... buffers); static ChannelBuffer wrappedBuffer(boolean gathering, ChannelBuffer... buffers); static ChannelBuffer wrappedBuffer(ByteBuffer... buffers); static ChannelBuffer wrappedBuffer(boolean gathering, ByteBuffer... buffers); static ChannelBuffer copiedBuffer(byte[] array); static ChannelBuffer copiedBuffer(ByteOrder endianness, byte[] array); static ChannelBuffer copiedBuffer(byte[] array, int offset, int length); static ChannelBuffer copiedBuffer(ByteOrder endianness, byte[] array, int offset, int length); static ChannelBuffer copiedBuffer(ByteBuffer buffer); static ChannelBuffer copiedBuffer(ChannelBuffer buffer); static ChannelBuffer copiedBuffer(byte[]... arrays); static ChannelBuffer copiedBuffer(ByteOrder endianness, byte[]... arrays); static ChannelBuffer copiedBuffer(ChannelBuffer... buffers); static ChannelBuffer copiedBuffer(ByteBuffer... buffers); static ChannelBuffer copiedBuffer(CharSequence string, Charset charset); static ChannelBuffer copiedBuffer(
            CharSequence string, int offset, int length, Charset charset); static ChannelBuffer copiedBuffer(ByteOrder endianness, CharSequence string, Charset charset); static ChannelBuffer copiedBuffer(
            ByteOrder endianness, CharSequence string, int offset, int length, Charset charset); static ChannelBuffer copiedBuffer(char[] array, Charset charset); static ChannelBuffer copiedBuffer(
            char[] array, int offset, int length, Charset charset); static ChannelBuffer copiedBuffer(ByteOrder endianness, char[] array, Charset charset); static ChannelBuffer copiedBuffer(
            ByteOrder endianness, char[] array, int offset, int length, Charset charset); @Deprecated static ChannelBuffer copiedBuffer(String string, String charsetName); @Deprecated static ChannelBuffer copiedBuffer(ByteOrder endianness, String string, String charsetName); static ChannelBuffer unmodifiableBuffer(ChannelBuffer buffer); static ChannelBuffer hexDump(String hexString); static String hexDump(ChannelBuffer buffer); static String hexDump(ChannelBuffer buffer, int fromIndex, int length); static int hashCode(ChannelBuffer buffer); static boolean equals(ChannelBuffer bufferA, ChannelBuffer bufferB); static int compare(ChannelBuffer bufferA, ChannelBuffer bufferB); static int indexOf(ChannelBuffer buffer, int fromIndex, int toIndex, byte value); static int indexOf(
            ChannelBuffer buffer, int fromIndex, int toIndex, ChannelBufferIndexFinder indexFinder); static short swapShort(short value); static int swapMedium(int value); static int swapInt(int value); static long swapLong(long value); static final ByteOrder BIG_ENDIAN; static final ByteOrder LITTLE_ENDIAN; static final ChannelBuffer EMPTY_BUFFER; }### Answer:
@Test public void testSwapMedium() { assertEquals(0x563412, swapMedium(0x123456)); assertEquals(0x80, swapMedium(0x800000)); }