use expect instead of allow to assert