@Test public void testRoundUp8() { Assert.assertEquals(Util.roundUpTo8(0), 0); Assert.assertEquals(Util.roundUpTo8(1), 8); Assert.assertEquals(Util.roundUpTo8(2), 8); Assert.assertEquals(Util.roundUpTo8(3), 8); Assert.assertEquals(Util.roundUpTo8(4), 8); Assert.assertEquals(Util.roundUpTo8(5), 8); Assert.assertEquals(Util.roundUpTo8(6), 8); Assert.assertEquals(Util.roundUpTo8(7), 8); Assert.assertEquals(Util.roundUpTo8(8), 8); Assert.assertEquals(Util.roundUpTo8(121), 128); Assert.assertEquals(Util.roundUpTo8(128), 128); Assert.assertEquals(Util.roundUpTo8(BIG + 121), BIG + 128); Assert.assertEquals(Util.roundUpTo8(BIG + 128), BIG + 128); }
static long roundUpTo8(long val) { long rem = val & 7; if (rem != 0) val += 8L - rem; return val; }
Util { static long roundUpTo8(long val) { long rem = val & 7; if (rem != 0) val += 8L - rem; return val; } }
Util { static long roundUpTo8(long val) { long rem = val & 7; if (rem != 0) val += 8L - rem; return val; }  }
Util { static long roundUpTo8(long val) { long rem = val & 7; if (rem != 0) val += 8L - rem; return val; }   }
Util { static long roundUpTo8(long val) { long rem = val & 7; if (rem != 0) val += 8L - rem; return val; }    }