passing page arguments to drupal 8 from controller to form controller This is my code in routing.yml file

test.check-test:
  path: 'node/{node}/test'
  defaults:
    _form: '\Drupal\test\Form\Test'
    _title: 'Test'
  requirements:
    _permission: 'access test'


I need to get the value of node in the form controller buildForm function.

How can I access that? Any help?
Update the .routing.yml file like so:

test.check-test:
  path: 'node/{node}/test'
  defaults:
    _form: '\Drupal\test\Form\Test'
    _title: 'Test'
  requirements:
    _permission: 'access test'
    node: \d+
  options:
    _node_operation_route: TRUE


Then use it in your form controller the following way:

namespace Drupal\test\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\node\NodeInterface;

class Test extends FormBase {
  public function buildForm(array $form, FormStateInterface $form_state, NodeInterface $node = NULL) {
    $form['placeholder'] = [
      '#markup' =&gt; t('This is the form for @node_title.', [
        '@node_title' =&gt; $node-&gt;getTitle(),
      ]),
    ];

    return $form;
  }
}