A line such as this causes Jacoco to break and stop counting lines as being covered.
when(tRepository.getTripById(1L)).thenThrow(ElementNotFoundException.class);
Replacing this with an object instance fixes the problem and Jacoco then works as expected.
when(tRepository.getTripById(1L)).thenThrow(new ElementNotFoundException());