Added a when-applied for testing functions without arguments