Not sure if I understood your comment. You can enforce the ObjectDoesNotExistException constructor to receive a given parameter, but you still need a test to verify that the parameter receives the right value when created