@Test
	public void testFromString() {
		String s = "basic";
		try {
			Rarity r = Rarity.fromString(s);
			assert(r == Rarity.BASIC);
		} catch (IOException io) {
			fail(io.getMessage());
		}
		s = "fine";
		try {
			Rarity r = Rarity.fromString(s);
			assert(r == Rarity.FINE);
		} catch (IOException io) {
			fail(io.getMessage());
		}
		s = "masterwork";
		try {
			Rarity r = Rarity.fromString(s);
			assert(r == Rarity.MASTERWORK);
		} catch (IOException io) {
			fail(io.getMessage());
		}
		s = "rare";
		try {
			Rarity r = Rarity.fromString(s);
			assert(r == Rarity.RARE);
		} catch (IOException io) {
			fail(io.getMessage());
		}
		s = "exotic";
		try {
			Rarity r = Rarity.fromString(s);
			assert(r == Rarity.EXOTIC);
		} catch (IOException io) {
			fail(io.getMessage());
		}
		s = "ascended";
		try {
			Rarity r = Rarity.fromString(s);
			assert(r == Rarity.ASCENDED);
		} catch (IOException io) {
			fail(io.getMessage());
		}
		s = "LEGENDARY";
		try {
			Rarity r = Rarity.fromString(s);
			assert(r == Rarity.LEGENDARY);
		} catch (IOException io) {
			fail(io.getMessage());
		}
	}