DNN-5847: add unit tests.