Added unit tests through flexunit and mockolate.
More unit testings.