Isn't this more general than a test case for the Dialog?