### Question:
Experience { public static int getXpForLevel(int level) { if (level < 1 || level > MAX_VIRT_LEVEL) { throw new IllegalArgumentException(level + " is not a valid level"); } return XP_FOR_LEVEL[level - 1]; }  static int getXpForLevel(int level); static int getLevelForXp(int xp); static double getCombatLevelPrecise(int attackLevel, int strengthLevel,
		int defenceLevel, int hitpointsLevel, int magicLevel,
		int rangeLevel, int prayerLevel); static int getCombatLevel(int attackLevel, int strengthLevel,
		int defenceLevel, int hitpointsLevel, int magicLevel,
		int rangeLevel, int prayerLevel); static final int MAX_REAL_LEVEL; static final int MAX_VIRT_LEVEL; static final int MAX_SKILL_XP; static final int MAX_COMBAT_LEVEL; }### Answer:
@Test public void testGetXpForLevel() { int xp = Experience.getXpForLevel(99); Assert.assertEquals(XP_FOR_99, xp); xp = Experience.getXpForLevel(126); Assert.assertEquals(XP_FOR_126, xp); xp = Experience.getXpForLevel(1); Assert.assertEquals(0, xp); }
@Test(expected = IllegalArgumentException.class) public void testGetXpForHighLevel() { int xp = Experience.getXpForLevel(Integer.MAX_VALUE); }
@Test(expected = IllegalArgumentException.class) public void testGetXpForLowLevel() { int xp = Experience.getXpForLevel(0); }