### Question:
AttackerModel extends FeatureModel implements Attacker, Recyclable { @Override public void stopAttack() { stop = true; } AttackerModel(Services services, Setup setup); @Override void prepare(FeatureProvider provider); @Override void checkListener(Object listener); @Override void addListener(AttackerListener listener); @Override void removeListener(AttackerListener listener); @Override void attack(Transformable target); @Override void stopAttack(); @Override void update(double extrp); @Override void setAttackChecker(Predicate<Transformable> checker); @Override void setAttackDistanceComputer(ToDoubleBiFunction<Transformable, Transformable> distance); @Override void setAttackDelay(int tick); @Override void setAttackFrame(int frame); @Override void setAttackDistance(Range range); @Override void setAttackDamages(Range range); @Override int getAttackDamages(); @Override boolean isAttacking(); @Override Transformable getTarget(); @Override void recycle();  }### Answer:
@Test void testStopAttack() { canAttack.set(true); attacker.setAttackChecker(t -> canAttack.get()); attacker.setAttackDistance(new Range(0, 2)); final Transformable target = new TransformableModel(services, setup); target.teleport(1, 1); attacker.attack(target); attacker.update(1.0); attacker.update(1.0); assertTrue(attacker.isAttacking()); attacker.stopAttack(); assertTrue(attacker.isAttacking()); attacker.update(1.0); assertFalse(attacker.isAttacking()); }