### Question:
NumberBytesConversion { public static byte[] toBytes(final long value) { final int size = byteSize(value); final byte[] output = new byte[size]; long v = (value >= 0 ? value - OFFSET_VALUE[size - 1] : value + OFFSET_VALUE[size - 1]); for (int i = size - 1; i >= 0; i--) { output[i] = (byte) v; v >>= 8; } output[0] = (byte) ((output[0] | HEAD_PATTERN[size - 1]) & AND_MASK[size - 1]); return output; } private  NumberBytesConversion(); static int byteSize(final long value); static byte[] toBytes(final long value); static int toStream(final long value, final OutputStream output); static long fromBytes(final byte[] input); static int fromStream(final InputStream input, final int maxByteSize, final long[] output); static short shortFromBytes(final byte[] input); static int shortFromStream(final InputStream input, final int maxByteSize, final short[] output); static int intFromBytes(final byte[] input); static int intFromStream(final InputStream input, final int maxByteSize, final int[] output);  }### Answer:
@Test public void testBytes() { Assert.assertArrayEquals(new byte[] { 0 }, NumberBytesConversion.toBytes(0)); Assert.assertArrayEquals(new byte[] { 5 }, NumberBytesConversion.toBytes(5)); Assert.assertArrayEquals(new byte[] { 40 }, NumberBytesConversion.toBytes(40)); Assert.assertArrayEquals(new byte[] { 63 }, NumberBytesConversion.toBytes(63)); }