Make action optional in constructor and don't call test or action if not set.