### Question:
EventServiceImpl implements EventService { @Override public void createFightHappenedEvent(UUID attackerId, UUID defenderId, UUID planetId, UUID fightId) { Preconditions.checkNotNull(attackerId, "attackerId"); Preconditions.checkNotNull(defenderId, "defenderId"); Preconditions.checkNotNull(planetId, "planetId"); Preconditions.checkNotNull(fightId, "fightId"); LOGGER.debug("Creating fight happened event for attacker {}, defender {} on planet {} with fight {}", attackerId, defenderId, planetId, fightId); long round = roundService.getCurrentRound(); Event attackerEvent = new Event(uuidFactory.create(), attackerId, planetId, EventType.FIGHT_HAPPENED, round, Optional.of(fightId)); eventDAO.insert(attackerEvent); Event defenderEvent = new Event(uuidFactory.create(), defenderId, planetId, EventType.FIGHT_HAPPENED, round, Optional.of(fightId)); eventDAO.insert(defenderEvent); } @Inject  EventServiceImpl(EventDAO eventDAO, UUIDFactory uuidFactory, RoundService roundService); @Override List<EventWithPlanet> findSinceMax(UUID playerId, long round, int max); @Override List<EventWithPlanet> findSince(UUID playerId, long round); @Override Event createBuildingCompletedEvent(UUID playerId, UUID planetId); @Override void createFightHappenedEvent(UUID attackerId, UUID defenderId, UUID planetId, UUID fightId); @Override void createFlightDetectedEvent(UUID attackerId, UUID defenderId, UUID planetId, UUID flightId, UUID detectedFlightId); @Override Event createTransportArrivedEvent(UUID playerId, UUID planetId); @Override Event createPlanetColonizedEvent(UUID playerId, UUID planetId); @Override Event createShipCompletedEvent(UUID playerId, UUID planetId); @Override Event createFlightReturnedEvent(UUID playerId, UUID planetId); @Override Event createTransferArrivedEvent(UUID playerId, UUID planetId); @Override Event createResearchCompletedEvent(UUID playerId, UUID planetId);  }### Answer:
@Test public void testCreateFightHappenedEvent() throws Exception { UUID fightId = UUID.randomUUID(); UUID id1 = UUID.randomUUID(); UUID id2 = UUID.randomUUID(); when(uuidFactory.create()).thenReturn(id1, id2); sut.createFightHappenedEvent(Data.Player1.PLAYER.getId(), Data.Player2.PLAYER.getId(), Data.Player1.Planet1.PLANET.getId(), fightId); verify(eventDAO).insert(new Event(id1, Data.Player1.PLAYER.getId(), Data.Player1.Planet1.PLANET.getId(), EventType.FIGHT_HAPPENED, 1, Optional.of(fightId))); verify(eventDAO).insert(new Event(id2, Data.Player2.PLAYER.getId(), Data.Player1.Planet1.PLANET.getId(), EventType.FIGHT_HAPPENED, 1, Optional.of(fightId))); }