CoderUtil { static byte[] getEmptyChunk(int leastLength) { if (emptyChunk.length >= leastLength) { return emptyChunk; } synchronized (CoderUtil.class) { emptyChunk = new byte[leastLength]; } return emptyChunk; } private  CoderUtil();   }
@Test public void testGetEmptyChunk() { byte[] ret = CoderUtil.getEmptyChunk(chunkSize); for (int i = 0; i < chunkSize; i++) { assertEquals(0, ret[i]); } }