mock is extended
added check for auth params before using it
rewrited test code for alloc, free config
merge conflict resolved