@Test
void removing_nonexistent_location_should_publish_error() {

    when(repository.find(location.id())).thenReturn(Optional.empty());
    locationService.removeLocation(location.id());
    verifyNoInteractions(optimizer);
    verify(repository, never()).removeLocation(anyLong());
    verify(eventPublisher).publishEvent(any(ErrorEvent.class));
}