Optionals madness in tests