void triggerEvent(final DiscordGameEventType eventType)
	{
		final Optional<EventWithTime> foundEvent = events.stream().filter(e -> e.type == eventType).findFirst();
		final EventWithTime event;

		if (foundEvent.isPresent())
		{
			event = foundEvent.get();
		}
		else
		{
			event = new EventWithTime(eventType);
			event.setStart(Instant.now());
			events.add(event);
		}

		event.setUpdated(Instant.now());

		if (event.getType().isShouldClear())
		{
			events.removeIf(e -> e.getType() != eventType && e.getType().isShouldBeCleared());
		}

		if (event.getType().isShouldRestart())
		{
			event.setStart(Instant.now());
		}

		events.sort((a, b) -> ComparisonChain.start()
			.compare(b.getType().getPriority(), a.getType().getPriority())
			.compare(b.getUpdated(), a.getUpdated())
			.result());

		log.debug("Events: {}", events);

		updatePresenceWithLatestEvent();
	}
@Test
	public void testAreaChange()
	{
		when(discordConfig.elapsedTimeType()).thenReturn(DiscordConfig.ElapsedTimeType.TOTAL);

		// Start with state of IN_GAME
		ArgumentCaptor<DiscordPresence> captor = ArgumentCaptor.forClass(DiscordPresence.class);
		discordState.triggerEvent(DiscordGameEventType.IN_GAME);
		verify(discordService, times(1)).updatePresence(captor.capture());
		assertEquals(DiscordGameEventType.IN_GAME.getState(), captor.getValue().getState());

		// IN_GAME -> CITY
		discordState.triggerEvent(DiscordGameEventType.CITY_VARROCK);
		verify(discordService, times(2)).updatePresence(captor.capture());
		assertEquals(DiscordGameEventType.CITY_VARROCK.getState(), captor.getValue().getState());

		// CITY -> IN_GAME
		discordState.triggerEvent(DiscordGameEventType.IN_GAME);
		verify(discordService, times(3)).updatePresence(captor.capture());
		assertEquals(DiscordGameEventType.IN_GAME.getState(), captor.getValue().getState());
	}