@Test
public void testLoad() throws URISyntaxException, SAXException, IOException {
SpellGroupsXMLLoader loader = new SpellGroupsXMLLoader(new URI("testspells.xml"));
List<DefaultSpell> list = loader.load();
assertThat(Boolean.valueOf(list.isEmpty()), is(Boolean.FALSE));
DefaultSpell spell = list.get(0);
assertThat(spell.getName(), is("heal"));
assertThat(spell.getNature(), is(Nature.LIGHT));
assertThat(spell.getImplementationClass(), notNullValue());
assertThat(spell.getImplementationClass().getName(), is("games.stendhal.server.entity.spell.HealingSpell"));
assertThat(spell.getAmount(),is(Integer.valueOf(100)));
assertThat(spell.getAtk(),is(Integer.valueOf(0)));
assertThat(spell.getCooldown(),is(Integer.valueOf(3)));
assertThat(spell.getDef(),is(Integer.valueOf(0)));
assertThat(spell.getLifesteal(),is(Double.valueOf(0.5)));
assertThat(spell.getMana(),is(Integer.valueOf(5)));
assertThat(spell.getMinimumLevel(),is(Integer.valueOf(0)));
assertThat(spell.getRange(),is(Integer.valueOf(10)));
assertThat(spell.getRate(),is(Integer.valueOf(1)));
assertThat(spell.getRegen(),is(Integer.valueOf(100)));
SingletonRepository.getEntityManager().addSpell(spell);
Spell entity = SingletonRepository.getEntityManager().getSpell("heal");
assertThat(entity, notNullValue());
assertThat(entity.getName(), is("heal"));
assertThat(entity.getNature(), is(Nature.LIGHT));