config unittests and bugfix

introduce other config unittests, fix bug