### Question:
Hilbert { public static Point getPoint(long s, int n) { long state, x, y; state = 0; x = 0; y = 0; for (int i = 2 * n - 2; i >= 0; i -= 2) { long row = 4 * state | ((s >> i) & 3); x = (x << 1) | ((0x936C >> row) & 1); y = (y << 1) | ((0x39C6 >> row) & 1); state = (0x3E6B94C1 >> 2 * row) & 3; } return new Point((int) x, (int) y); } private  Hilbert(); static Point getPoint(long s, int n);  }### Answer:
@Test public void testEvenOdd() { Point res; res = Hilbert.getPoint(16, 3); assertEquals(new Point(0, 4), res); res = Hilbert.getPoint(16, 4); assertEquals(new Point(4, 0), res); res = Hilbert.getPoint(16, 5); assertEquals(new Point(0, 4), res); res = Hilbert.getPoint(16, 6); assertEquals(new Point(4, 0), res); }
@Test public void testOrder1() { Point res; res = Hilbert.getPoint(0, 1); assertEquals(new Point(0, 0), res); res = Hilbert.getPoint(1, 1); assertEquals(new Point(0, 1), res); res = Hilbert.getPoint(2, 1); assertEquals(new Point(1, 1), res); res = Hilbert.getPoint(3, 1); assertEquals(new Point(1, 0), res); }
@Test public void testOrder2() { Point res; res = Hilbert.getPoint(0, 2); assertEquals(new Point(0, 0), res); res = Hilbert.getPoint(1, 2); assertEquals(new Point(1, 0), res); res = Hilbert.getPoint(2, 2); assertEquals(new Point(1, 1), res); res = Hilbert.getPoint(3, 2); assertEquals(new Point(0, 1), res); res = Hilbert.getPoint(4, 2); assertEquals(new Point(0, 2), res); res = Hilbert.getPoint(5, 2); assertEquals(new Point(0, 3), res); res = Hilbert.getPoint(6, 2); assertEquals(new Point(1, 3), res); res = Hilbert.getPoint(7, 2); assertEquals(new Point(1, 2), res); res = Hilbert.getPoint(8, 2); assertEquals(new Point(2, 2), res); res = Hilbert.getPoint(9, 2); assertEquals(new Point(2, 3), res); res = Hilbert.getPoint(10, 2); assertEquals(new Point(3, 3), res); res = Hilbert.getPoint(11, 2); assertEquals(new Point(3, 2), res); res = Hilbert.getPoint(12, 2); assertEquals(new Point(3, 1), res); res = Hilbert.getPoint(13, 2); assertEquals(new Point(2, 1), res); res = Hilbert.getPoint(14, 2); assertEquals(new Point(2, 0), res); res = Hilbert.getPoint(15, 2); assertEquals(new Point(3, 0), res); }