Resolving unit testing issues