### Question:
TwoLevelNavigator implements TwoDimensional { @Override public Position position(int major, int minor) { return new Pos(major, minor); } TwoLevelNavigator(IntSupplier elemCount, IntUnaryOperator elemLength); @Override Position position(int major, int minor); @Override Position offsetToPosition(int offset, Bias bias);  }### Answer:
@Test public void testNegativeOffsetWithBackwardBias() { Position pos = navigator.position(4, 10); pos = pos.offsetBy(-10, Backward); assertEquals(3, pos.getMajor()); assertEquals(10, pos.getMinor()); }
@Test public void testNegativeOffsetWithForwardBias() { Position pos = navigator.position(4, 10); pos = pos.offsetBy(-10, Forward); assertEquals(4, pos.getMajor()); assertEquals(0, pos.getMinor()); }
@Test public void testZeroOffsetWithBackwardBias() { Position pos = navigator.position(3, 0); pos = pos.offsetBy(0, Backward); assertEquals(2, pos.getMajor()); assertEquals(10, pos.getMinor()); assertEquals(pos, pos.offsetBy(0, Backward)); }
@Test public void testZeroOffsetWithForwardBias() { Position pos = navigator.position(2, 10); pos = pos.offsetBy(0, Forward); assertEquals(3, pos.getMajor()); assertEquals(0, pos.getMinor()); assertEquals(pos, pos.offsetBy(0, Forward)); }