### Question:
DragonSlayer { public void goToBattle() { strategy.execute(); } DragonSlayer(DragonSlayingStrategy strategy); void changeStrategy(DragonSlayingStrategy strategy); void goToBattle();  }### Answer:
@Test public void testGoToBattle() { final var strategy = mock(DragonSlayingStrategy.class); final var dragonSlayer = new DragonSlayer(strategy); dragonSlayer.goToBattle(); verify(strategy).execute(); verifyNoMoreInteractions(strategy); }
@Test public void testGoToBattle() { final DragonSlayingStrategy strategy = mock(DragonSlayingStrategy.class); final DragonSlayer dragonSlayer = new DragonSlayer(strategy); dragonSlayer.goToBattle(); verify(strategy).execute(); verifyNoMoreInteractions(strategy); }