class Util {

    public static byte[] revertUnsignedLong(UnsignedLong input) {
        return ByteBuffer.allocate(Long.SIZE / 8).putLong(Long.reverseBytes(input.longValue())).array();
    }

}

class UtilTest {

    @Test
    public void testRevertUnsignedLong(){

        UnsignedLong unsignedLong = UnsignedLong.valueOf("12179241258665439971");
        byte[] reversed = Util.revertUnsignedLong(unsignedLong);
        Assert.assertEquals("e3f28878655b05a9", Util.bytesToHex(reversed));
    }

}