@Test public void testPerformerAttacksAnimal() { World world = new WorldImpl(10, 10, null, null); WorldObject performer = TestUtils.createIntelligentWorldObject(2, "performer"); CreatureGenerator creatureGenerator = new CreatureGenerator(TestUtils.createIntelligentWorldObject(1, "cow")); int cowId = creatureGenerator.generateCow(0, 0, world); WorldObject cow = world.findWorldObjectById(cowId); assertEquals(false, cow.getProperty(Constants.ANIMAL_ENEMIES).contains(performer)); DefaultGoalObstructedHandler.performerAttacksAnimal(performer, cow); assertEquals(true, cow.getProperty(Constants.ANIMAL_ENEMIES).contains(performer)); }