public static Pair<Double, String> getByteUint(long value) {
        double doubleValue = (double) value;
        String unit;
        if (value >= TERABYTE) {
            unit = "TB";
            doubleValue /= TERABYTE;
        } else if (value >= GIGABYTE) {
            unit = "GB";
            doubleValue /= GIGABYTE;
        } else if (value >= MEGABYTE) {
            unit = "MB";
            doubleValue /= MEGABYTE;
        } else if (value >= KILOBYTE) {
            unit = "KB";
            doubleValue /= KILOBYTE;
        } else {
            unit = "B";
        }
        return Pair.create(doubleValue, unit);
    }
@Test
    public void testGetByteUint() {
        Pair<Double, String> result;
        result = DebugUtil.getByteUint(0);
        Assert.assertEquals(result.first, Double.valueOf(0.0));
        Assert.assertEquals(result.second, "B");

        result = DebugUtil.getByteUint(123);     // B
        Assert.assertEquals(result.first, Double.valueOf(123.0));
        Assert.assertEquals(result.second, "B");

        result = DebugUtil.getByteUint(123456);  // K
        Assert.assertEquals(result.first, Double.valueOf(120.5625));
        Assert.assertEquals(result.second, "KB");

        result = DebugUtil.getByteUint(1234567);  // M
        Assert.assertEquals(result.first, Double.valueOf(1.1773748397827148));
        Assert.assertEquals(result.second, "MB");

        result = DebugUtil.getByteUint(1234567890L);  // G
        Assert.assertEquals(result.first, Double.valueOf(1.1497809458523989));
        Assert.assertEquals(result.second, "GB");
    }