### Question:
IdMapper { public static UUID toGlobalID(long id) { if (id < 0) throw new IllegalArgumentException("id must not be negative."); return new UUID(0, id); }  static UUID toGlobalID(long id); static long toInternalID(UUID id);  }### Answer:
@Test public void testToGlobalId() { assertEquals(UUID.fromString("00000000-0000-0000-0000-000000000001"), IdMapper.toGlobalID(1)); }
@Test(expected = IllegalArgumentException.class) public void testToGlobalIdNegativeIdThrowsException() { IdMapper.toGlobalID(-1); }