Added unit test code for fade.