HllCount { public static byte[] getSketchFromByteBuffer(@Nullable ByteBuffer bf) { if (bf == null) { return new byte[0]; } else { byte[] result = new byte[bf.remaining()]; bf.get(result); return result; } } private  HllCount(); static byte[] getSketchFromByteBuffer(@Nullable ByteBuffer bf); static final int MINIMUM_PRECISION; static final int MAXIMUM_PRECISION; static final int DEFAULT_PRECISION; }
@Test public void testGetSketchFromByteBufferForEmptySketch() { assertArrayEquals(HllCount.getSketchFromByteBuffer(null), EMPTY_SKETCH); }
@Test public void testGetSketchFromByteBufferForNonEmptySketch() { ByteBuffer bf = ByteBuffer.wrap(INTS1_SKETCH); assertArrayEquals(HllCount.getSketchFromByteBuffer(bf), INTS1_SKETCH); }