NG-14981 Adding tests for the code