@Test public void testEncodeDecode() throws Exception { byte[] bytes = new byte[10]; int startPos = 3; for (int i = 1; i < bounds.length - 1; i++) { testEncodeDecode(i, bounds[i] - 1, bytes, startPos); testEncodeDecode(i + 1, bounds[i], bytes, startPos); testEncodeDecode(i + 1, bounds[i] + 1, bytes, startPos); } // Integer.Max testEncodeDecode(5, BOUND_FIVE_BYTE, bytes, startPos); }