Currently we probably throw a NoSuchElementException due to trying to access an Optional without checking if it contains a value beforehand.
Let's add integration tests, then improve the responsible code.