How to write a partial "setRebuild"?
Can you please try adding this to your buildForm() method:

$form['#parents'] = array();


According to documentation: FormStateInterface::setValueForElement
You need to pass an array() and set the parents array for the form element.
Hope this helps. 

UPDATE
After revisiting the documentation, can you try this code:  

$form_state-&gt;setValueForElement($form_state-&gt;getValue('test'),"0");