public void testLazyIntegerWrite() throws Throwable { try { ByteStream.Output out = new ByteStream.Output(); int[] tests = { 0, -1, 1, -10, 10, -123, 123, Integer.MIN_VALUE, Integer.MIN_VALUE + 1, Integer.MAX_VALUE, Integer.MAX_VALUE - 1 }; for (int v : tests) { out.reset(); LazyInteger.writeUTF8(out, v); Text t = new Text(); t.set(out.getData(), 0, out.getCount()); assertEquals(String.valueOf(v), t.toString()); } } catch (Throwable e) { e.printStackTrace(); throw e; } }