public class BitManipulationTest extends TestCase {
public void testBitManipulation() {
BitManipulation bm = new BitManipulation();
long mag1 = BitManipulation.magic2;
long a = 3;
long b = bm.swapLSBMSB(a);
assertEquals("swapLSBMSB=" + b, 1, a/b, 1e-10);
a = 8;
b = bm.swapLSBMSB(a);
assertEquals("swapLSBMSB=" + b, 2, a/b, 1e-10);
a = 3;