Revert "Revert "DNN-6234 - removed internal set to allow unit testing""

This reverts commit c8eee8a90975b5f7fc75169c41528b07687dcf0d.