There are no tests that really show how to delete configs via the Mutation API.
I discovered that null values coming in the global conf update of the SchedConfUpdateInfo DTO class will be translated to an action that deletes the config from the Configuration object.
The request field of this global config map is called "global-updates" and the corresponding code is here.
See the code fragment of MutableCSConfigurationProvider that deletes the configuration: here
A good candidate class would be: TestRMWebServicesConfigurationMutation.
Here, we can add a testcase that does some Node label related API actions, as when deleting node labels and de-assigning the capacities from labels and queues, some residual config will stay in the Configuration object, so it's easy to show what's going on and how to get rid of those configs.
The testcase should perform the following:
1. Create a node label by calling the "add-node-labels" endpoint.
2. Verify that the node label is created by calling the "get-node-labels" endpoint
3. Assign some queues to the new label
4. Set partition capacities to queues
5. Verify if the capacities are applied to the partitions.
6. De-assign node label from the queues + remove the residual configs by sending empty strings or null values. Basically, this is inverting the configs set by step 3.
7. Remove the node label
8. Check if the residual configs are in the Configuration object. They shouldn't be in it.