Fix error for deleted command and add tests for RoleCommand