Migrate tests away from Optional.get()